X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon.pm;h=1c820dbe6429c508946e89c80fee3d77b76c1106;hp=2af9b5306a78229d334deaa819bd2b0fd30ece26;hb=e172b8d90d22950ff496364fd06a6c2e9b33eb61;hpb=34cc90c9aa31c1cad1fcef0684e940407426ad1d diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 2af9b53..1c820db 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -34,6 +34,7 @@ use constant FORMAT_EXTENSION => { PERL => 'pl', PHP => 'php', PYTHON => 'py', + PYTHON3 => 'py', RUBY => 'rb', RUST => 'rs', SBCL => 'l', @@ -128,8 +129,8 @@ sub process_job { my $timeout_override = db()->query('SELECT timeout FROM limits WHERE problem=? AND format=?', $job->{problem}, $job->{format})->list; $meta->{timeout} = $timeout_override if defined $timeout_override; $meta->{tests} = decode_json $pb->{tests} if $meta->{runner} eq 'File'; - $job->{contest} &&= contest_entry($job->{contest}); - delete $meta->{precnt} unless $job->{contest} && $job->{contest}{started} && !$job->{contest}{finished}; ## no critic (ProhibitNegativeExpressionsInUnlessAndUntilConditions) + my $contest = $job->{contest} && contest_entry($job->{contest}); + delete $meta->{precnt} unless $contest && $contest->{started} && !$contest->{finished}; ## no critic (ProhibitNegativeExpressionsInUnlessAndUntilConditions) $meta->{testcnt} = $meta->{precnt} if $meta->{precnt}; $meta->{files}{ver} = {