]> iEval git - gruntmaster-data.git/commitdiff
Ignore pending and running jobs when building standings
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Apr 2017 14:19:55 +0000 (17:19 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Apr 2017 14:19:55 +0000 (17:19 +0300)
lib/Gruntmaster/Data.pm

index c6b6f6f2097207bac5057593c9226c6f25e4bbda..a9c128d0cbb330c914eefdd6a85024495db214e7 100644 (file)
@@ -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};
This page took 0.020511 seconds and 4 git commands to generate.