Merge pull request #54 from silbinarywolf/fix-healthcheckbug

FIX Ensure QueuedJob health check doesn't kill long running review jobs
This commit is contained in:
Robbie Averill 2018-06-20 19:33:14 +12:00 committed by GitHub
commit a112834cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,14 @@ class ContentReviewNotificationJob extends AbstractQueuedJob implements QueuedJo
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()
{
$this->queueNextRun();