Browse files

make the queue for an enqueued job available in the afterEnqueue event

  • Loading branch information...
1 parent 3188265 commit b0fbfa4f15bae27eba38f6201e417c7ea55b3984 Chris Boulton committed May 10, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 README.md
  2. +2 −1 lib/Resque.php
View
3 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 ##
View
3 lib/Resque.php
@@ -154,7 +154,8 @@ public static function enqueue($queue, $class, $args = null, $trackStatus = fals
if ($result) {
Resque_Event::trigger('afterEnqueue', array(
'class' => $class,
- 'args' => $args,
+ 'args' => $args,
+ 'queue' => $queue,
));
}

0 comments on commit b0fbfa4

Please sign in to comment.