From: Marius Gavrilescu Date: Wed, 15 Jan 2014 09:24:47 +0000 (+0200) Subject: Use centralised pub/sub X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=b16e6cc2afaec884ac380c15cd5473f3af8d38bb;p=gruntmaster-handlers.git Use centralised pub/sub --- diff --git a/lib/Gruntmaster/Handlers.pm b/lib/Gruntmaster/Handlers.pm index c77e923..9e92dc2 100644 --- a/lib/Gruntmaster/Handlers.pm +++ b/lib/Gruntmaster/Handlers.pm @@ -18,11 +18,8 @@ use Cwd qw/cwd/; use File::Basename qw/fileparse/; use File::Temp qw/tempdir/; use File::Copy qw/move/; -use Gruntmaster::Data qw/contest_start contest_end push_job set_job_inmeta/; +use Gruntmaster::Data qw/contest_start contest_end push_job set_job_inmeta PUBLISH/; use Gruntmaster::Page::Log; -use Redis; - -my $redis = Redis->new; sub submit{ my $r = shift; @@ -54,7 +51,7 @@ sub submit{ } }; - $redis->publish('jobs', $job); + PUBLISH 'jobs', $job; $r->print("Job submitted"); OK }