diff --git a/lib/ResqueScheduler/Worker.php b/lib/ResqueScheduler/Worker.php index 73e0051..d0b4d30 100644 --- a/lib/ResqueScheduler/Worker.php +++ b/lib/ResqueScheduler/Worker.php @@ -55,9 +55,9 @@ public function work($interval = null) */ public function handleDelayedItems($timestamp = null) { - while (($timestamp = ResqueScheduler::nextDelayedTimestamp($timestamp)) !== false) { + while (($oldestJobTimestamp = ResqueScheduler::nextDelayedTimestamp($timestamp)) !== false) { $this->updateProcLine('Processing Delayed Items'); - $this->enqueueDelayedItemsForTimestamp($timestamp); + $this->enqueueDelayedItemsForTimestamp($oldestJobTimestamp); } }