Skip to content

Commit

Permalink
Merge pull request chrisboulton#34 from mhagstrand/SleepingWithDelayI…
Browse files Browse the repository at this point in the history
…nQueue

Fix bug where scheduler sleeps when processing a delayed queue
  • Loading branch information
chrisboulton authored Nov 28, 2016
2 parents 894b41d + 073f25f commit 5954c98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ResqueScheduler/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 5954c98

Please sign in to comment.