]> iEval git - gruntmaster-handlers.git/commitdiff
Use centralised pub/sub
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 15 Jan 2014 09:24:47 +0000 (11:24 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 15 Jan 2014 09:24:47 +0000 (11:24 +0200)
lib/Gruntmaster/Handlers.pm

index c77e9239e6664608f04f7f62d0836031dc2b368a..9e92dc264139e3b65771e23b59b1901671357099 100644 (file)
@@ -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
 }
This page took 0.030002 seconds and 4 git commands to generate.