From b0fbfa4f15bae27eba38f6201e417c7ea55b3984 Mon Sep 17 00:00:00 2001 From: Chris Boulton Date: Thu, 10 May 2012 22:13:28 +1000 Subject: [PATCH] make the queue for an enqueued job available in the afterEnqueue event --- README.md | 3 ++- lib/Resque.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 552b8a7..2f942ab 100644 --- a/README.md +++ b/README.md @@ -316,8 +316,9 @@ Called whenever a job fails. Arguments passed (in this order) include: Called after a job has been queued using the `Resque::enqueue` method. Arguments passed (in this order) include: -* Class - string containing the name of the class the job was scheduled in +* Class - string containing the name of scheduled job * Arguments - array of arguments supplied to the job +* Queue - string containing the name of the queue the job was added to ## Contributors ## diff --git a/lib/Resque.php b/lib/Resque.php index df211a6..9bc8143 100644 --- a/lib/Resque.php +++ b/lib/Resque.php @@ -154,7 +154,8 @@ class Resque if ($result) { Resque_Event::trigger('afterEnqueue', array( 'class' => $class, - 'args' => $args, + 'args' => $args, + 'queue' => $queue, )); }