Skip to content

Commit c50513e

Browse files
author
Chris Boulton
committed
fix a bug where job arguments were not being passed correctly when a job moved from the delayed queue in to a resque queue
1 parent ff3fc17 commit c50513e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/ResqueScheduler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static function jobToHash($queue, $class, $args)
101101
{
102102
return array(
103103
'class' => $class,
104-
'args' => $args,
104+
'args' => array($args),
105105
'queue' => $queue,
106106
);
107107
}

lib/ResqueScheduler/Worker.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public function enqueueDelayedItemsForTimestamp($timestamp)
8181
'args' => $item['args'],
8282
));
8383

84-
Resque::enqueue($item['queue'], $item['class'], $item['args']);
84+
$payload = array_merge(array($item['queue'], $item['class']), $item['args']);
85+
call_user_func_array('Resque::enqueue', $payload);
8586
}
8687
}
8788

0 commit comments

Comments
 (0)