X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon.pm;h=db2c757ac7bcef45f243eee0ed2ea5a4ad410d40;hp=e96690ef4da04816dbd51b3af2db21ab697deccb;hb=6d1f2d942e383e6f5acb59511caccb425ea8db85;hpb=074cbf76d0be8cb8613e56ae573b36de72863bb9 diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index e96690e..db2c757 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -4,7 +4,7 @@ use 5.014000; use strict; use warnings; -our $VERSION = '5999.000_004'; +our $VERSION = '5999.000_005'; use Gruntmaster::Daemon::Constants qw/ERR/; use Gruntmaster::Daemon::Format qw/prepare_files stopvms/; @@ -24,12 +24,14 @@ use constant FORMAT_EXTENSION => { GOLANG => 'go', GOLFSCRIPT => 'gs', HASKELL => 'hs', - MONO => 'cs', JAVA => 'java', + JULIA => 'jl', + MONO => 'cs', PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', RUBY => 'rb', + RUST => 'rs', SBCL => 'l', }; @@ -105,7 +107,7 @@ sub process{ sub process_job { my ($job) = @_; - my $pb = problem_full($job->{problem}); + my $pb = db()->select('problems', '*', {id => $job->{problem}})->hash; my $meta = { problem => $job->{problem}, files => { @@ -121,7 +123,7 @@ sub process_job { $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}; + delete $meta->{precnt} unless $job->{contest} && $job->{contest}{started} && !$job->{contest}{finished}; ## no critic (ProhibitNegativeExpressionsInUnlessAndUntilConditions) $meta->{testcnt} = $meta->{precnt} if $meta->{precnt}; $meta->{files}{ver} = {