From 7f90c3b14dc4fef413b0203bddc0826cc3d6e49b Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 6 Apr 2017 17:19:55 +0300 Subject: [PATCH] Ignore pending and running jobs when building standings --- lib/Gruntmaster/Data.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}; -- 2.30.2