]> iEval git - gruntmaster-daemon.git/commitdiff
Update problem_statuses after job
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 19 Dec 2014 11:06:46 +0000 (13:06 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 19 Dec 2014 11:06:46 +0000 (13:06 +0200)
lib/Gruntmaster/Daemon.pm

index cb41e0d19f5e8bec50f080980b35fbfe3d78cba1..15f6410af68e779a182d4da4318df198472d6ba0 100644 (file)
@@ -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);
 
This page took 0.017533 seconds and 4 git commands to generate.