Skip to content

Commit 2f7aae9

Browse files
author
Chris Boulton
committed
fix up an issue where if a job managed to have a timestamp of 0, it would cause the scheduler worker to get stuck in an infinite loop
1 parent dd7b746 commit 2f7aae9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ResqueScheduler/Worker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* ResqueScheduler worker to handle scheduling of delayed tasks.
44
*
55
* @package ResqueScheduler
6-
* @author Chris Boulton <chris.boulton@interspire.com>
6+
* @author Chris Boulton <chris@bigcommerce.com>
77
* @copyright (c) 2012 Chris Boulton
88
* @license http://www.opensource.org/licenses/mit-license.php
99
*/
@@ -55,7 +55,7 @@ public function work($interval = null)
5555
*/
5656
public function handleDelayedItems($timestamp = null)
5757
{
58-
while ($timestamp = ResqueScheduler::nextDelayedTimestamp($timestamp)) {
58+
while (($timestamp = ResqueScheduler::nextDelayedTimestamp($timestamp)) !== false) {
5959
$this->updateProcLine('Processing Delayed Items');
6060
$this->enqueueDelayedItemsForTimestamp($timestamp);
6161
}

0 commit comments

Comments
 (0)