FIX Ensure QueuedJob health check doesn't kill long running review jobs

This commit is contained in:
Jake Bentvelzen 2017-02-03 11:40:55 +11:00 committed by Jake B
parent 95d697fcba
commit 3679cb7f7d

View File

@ -71,6 +71,14 @@ class ContentReviewNotificationJob extends AbstractQueuedJob implements QueuedJo
return QueuedJob::QUEUED; return QueuedJob::QUEUED;
} }
public function setup() {
parent::setup();
// Recommended for long running jobs that don't increment 'currentStep'
// https://github.com/silverstripe-australia/silverstripe-queuedjobs
$this->currentStep = -1;
}
public function process() public function process()
{ {
$this->queueNextRun(); $this->queueNextRun();