From: Marius Gavrilescu Date: Thu, 30 Jan 2014 16:27:55 +0000 (+0200) Subject: Add contest support to gensrc X-Git-Tag: 5999.000_001~23 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=0890dd25777c65562991248375c8513a8a70ec1e;p=gruntmaster-daemon.git Add contest support to gensrc --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index d636965..c3ee591 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -130,7 +130,7 @@ sub process{ set_job_errors $job, $errors; my $log = $Gruntmaster::Data::contest ? "ct/$Gruntmaster::Data::contest/log" : 'log'; - PUBLISH gensrc => $job; + PUBLISH gensrc => "$Gruntmaster::Data::contest.$job"; PUBLISH genpage => "$log/job/$job.html"; PUBLISH genpage => "$log/index.html"; PUBLISH genpage => "$log/st.html"; @@ -143,7 +143,7 @@ sub process{ sub got_job{ $_[0] =~ /^(\w*)\.(\d+)$/; my $job = $2; - $Gruntmaster::Data::contest = $1 if $1; + local $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");