Only use pretests when contests are running
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 25 Mar 2015 18:28:35 +0000 (20:28 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 25 Mar 2015 18:28:35 +0000 (20:28 +0200)
lib/Gruntmaster/Daemon.pm

index fe252f7..048321e 100644 (file)
@@ -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} = {
This page took 0.027291 seconds and 4 git commands to generate.