From: Marius Gavrilescu Date: Wed, 25 Mar 2015 18:28:35 +0000 (+0200) Subject: Only use pretests when contests are running X-Git-Tag: 5999.000_005~20 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=04f37b061e9367664bc357ac427a186d4d14ee14;p=gruntmaster-daemon.git Only use pretests when contests are running --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index fe252f7..048321e 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -121,7 +121,7 @@ sub process_job { my $limit_override = $job->result_source->schema->limits->find($meta->{problem}, $job->format); $meta->{timeout} = $limit_override->timeout if $limit_override; $meta->{tests} = decode_json $job->problem->tests if $meta->{runner} eq 'File'; - delete $meta->{precnt} unless $job->contest; + delete $meta->{precnt} unless $job->contest && $job->contest->is_running; $meta->{testcnt} = $meta->{precnt} if $meta->{precnt}; $meta->{files}{ver} = {