]> iEval git - gruntmaster-daemon.git/commitdiff
Add contest support
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 29 Jan 2014 16:58:00 +0000 (18:58 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 29 Jan 2014 16:58:00 +0000 (18:58 +0200)
lib/Gruntmaster/Daemon.pm

index 73610b39f98896afdc912d706fa7203fcde68c67..3b3f5be619fb032520f9a73fb7dd4479f5108829 100644 (file)
@@ -141,8 +141,10 @@ sub process{
 }
 
 sub got_job{
-       my $job = shift;
-       get_logger->debug("Taking job $job...");
+       $_[0] =~ /^(\w*)\.(\d+)$/;
+       my $job = $2;
+       $Gruntmaster::Data::contest = $1 if $1;
+       get_logger->debug("Taking job $job@{[defined $1 ? \" of contest $1\" : '']}...");
        if (set_job_daemon $job, hostname . ":$$") {
                get_logger->debug("Succesfully taken job $job");
                process $job;
This page took 0.028118 seconds and 4 git commands to generate.