X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon.pm;h=15f6410af68e779a182d4da4318df198472d6ba0;hp=1c8ceceda53f8cd4d76e9084af41bbcdc3cde83c;hb=b335c4bbcd278396e05c11d9bf60e0807a78726d;hpb=5a4392d52560b78196572d6680cb76dadc6e2782 diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 1c8cece..15f6410 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_003'; +our $VERSION = '5999.000_004'; use Gruntmaster::Daemon::Constants qw/ERR/; use Gruntmaster::Daemon::Format qw/prepare_files/; @@ -147,6 +147,14 @@ sub process{ $errors ? (errors => $errors) : () }); + my $solved = $meta->{result} ? 0 : 1; + my $status = $db->problem_statuses->find($jobr->owner, $jobr->problem); + $db->problem_statuses->update_or_create({ + problem => $jobr->problem, + owner => $jobr->owner, + job => $jobr->id, + solved => $solved}); + my $log = $jobr->contest ? 'ct/' . $jobr->contest->id . '/log' : 'log'; my $page = int (($job + PAGE_SIZE - 1) / PAGE_SIZE);