]> iEval git - gruntmaster-daemon.git/commitdiff
Add limit overrides
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 15:21:42 +0000 (17:21 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 15:25:34 +0000 (17:25 +0200)
lib/Gruntmaster/Daemon.pm

index 31e03984c4f370ab1f951508a89bcee2f963e4b6..a0ab1223e32ad3a88e8ae5414657485212ca419c 100644 (file)
@@ -117,6 +117,8 @@ sub process_job {
                },
                map { $_ => $job->problem->get_column($_) } qw/generator runner judge precnt testcnt timeout olimit/
        };
+       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;
        $meta->{testcnt} = $meta->{precnt} if $meta->{precnt};
This page took 0.028766 seconds and 4 git commands to generate.