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 73610b3..3b3f5be 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.026549 seconds and 4 git commands to generate.