Skip to content

Commit da309c1

Browse files
committed
Keep exitwhennothingtodo as optional config
1 parent 2632362 commit da309c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config/app_queue.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
// seconds of running time after which the worker will terminate (0 = unlimited)
2525
'workermaxruntime' => 120,
2626

27-
// instruct a Workerprocess quit when there are no more tasks for it to execute (true = exit, false = keep running)
28-
'exitwhennothingtodo' => false,
29-
3027
// minimum time (in seconds) which a task remains in the database before being cleaned up.
3128
'cleanuptimeout' => 2592000, // 30 days
3229

3330
/* Optional config keys */
3431

32+
// instruct a Workerprocess quit when there are no more tasks for it to execute (true = exit, false = keep running)
33+
'exitwhennothingtodo' => false,
34+
3535
// seconds of running time after which the PHP process will terminate, null uses workermaxruntime * 100
3636
'workertimeout' => null,
3737

src/Shell/QueueShell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function runworker() {
200200
$this->_log('job ' . $queuedJob->job_type . ', id ' . $queuedJob->id . ' failed and ' . $failedStatus, $pid);
201201
$this->out('Job did not finish, ' . $failedStatus . ' after try ' . $queuedJob->failed . '.');
202202
}
203-
} elseif (Configure::readOrFail('Queue.exitwhennothingtodo')) {
203+
} elseif (Configure::read('Queue.exitwhennothingtodo')) {
204204
$this->out('nothing to do, exiting.');
205205
$this->_exit = true;
206206
} else {

0 commit comments

Comments
 (0)