From: Marius Gavrilescu Date: Thu, 6 Apr 2017 14:19:55 +0000 (+0300) Subject: Ignore pending and running jobs when building standings X-Git-Tag: 6000.001~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;ds=sidebyside;h=7f90c3b14dc4fef413b0203bddc0826cc3d6e49b;p=gruntmaster-data.git Ignore pending and running jobs when building standings --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index c6b6f6f..a9c128d 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -192,7 +192,10 @@ sub standings { $opens{$problem, $owner} = $time; } - my $jobs = $db->select('job_entry', '*', {contest => $ct->{id}}, 'id'); + # result IS NULL if job was never run + # result = -2 if job is being rerun + my %where = (contest => $ct->{id}, result => {'>=', 0}); + my $jobs = $db->select('job_entry', '*', \%where, 'id'); while (my $job = $jobs->hash) { my $open = $opens{$job->{problem}, $job->{owner}} // $ct->{start};