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 31e0398..a0ab122 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.027475 seconds and 4 git commands to generate.