From: Marius Gavrilescu Date: Mon, 16 Mar 2015 15:21:42 +0000 (+0200) Subject: Add limit overrides X-Git-Tag: 5999.000_005~22 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=7628069eac4d6ac59c4249015f6a992cd3fd572b;p=gruntmaster-daemon.git Add limit overrides --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 31e0398..a0ab122 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -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};