Skip to content

Commit b0fbfa4

Browse files
author
Chris Boulton
committed
make the queue for an enqueued job available in the afterEnqueue event
1 parent 3188265 commit b0fbfa4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ Called whenever a job fails. Arguments passed (in this order) include:
316316
Called after a job has been queued using the `Resque::enqueue` method. Arguments passed
317317
(in this order) include:
318318

319-
* Class - string containing the name of the class the job was scheduled in
319+
* Class - string containing the name of scheduled job
320320
* Arguments - array of arguments supplied to the job
321+
* Queue - string containing the name of the queue the job was added to
321322

322323
## Contributors ##
323324

lib/Resque.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ public static function enqueue($queue, $class, $args = null, $trackStatus = fals
154154
if ($result) {
155155
Resque_Event::trigger('afterEnqueue', array(
156156
'class' => $class,
157-
'args' => $args,
157+
'args' => $args,
158+
'queue' => $queue,
158159
));
159160
}
160161

0 commit comments

Comments
 (0)