From 7628069eac4d6ac59c4249015f6a992cd3fd572b Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 16 Mar 2015 17:21:42 +0200 Subject: [PATCH] Add limit overrides --- lib/Gruntmaster/Daemon.pm | 2 ++ 1 file changed, 2 insertions(+) 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}; -- 2.39.2