Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to run DoormanQueuedJobTask without descriptor set #231

Open
nathancox opened this issue Jan 31, 2019 · 0 comments
Open

Trying to run DoormanQueuedJobTask without descriptor set #231

nathancox opened this issue Jan 31, 2019 · 0 comments

Comments

@nathancox
Copy link

I'm having an issue publishing pages via embargo. It doesn't happen every time but it often fails and gives errors about descriptor not being defined.

I give a page an embargo time then run /dev/tasks/ProcessJobQueueTask and usually within a few tries it will have this error and fail to publish:

[Notice] Trying to get property of non-object
GET /dev/tasks/ProcessJobQueueTask
Line 216 in /var/www/html/vendor/symbiote/silverstripe-queuedjobs/src/Jobs/DoormanQueuedJobTask.php

Source
207     {
208         $this->refreshDescriptor();
209 
210         // Treat completed jobs as cancelled when it comes to how Doorman handles picking up jobs to run
211         $cancelledStates = [
212             QueuedJob::STATUS_CANCELLED,
213             QueuedJob::STATUS_COMPLETE,
214         ];
215 
216         return in_array($this->descriptor->JobStatus, $cancelledStates, true);
217     }
218 }

So far it only seems to happen when the cwp-core 2.2.0 module is installed but I can't see any reason why that would be.

I've uploaded the most minimal test case I could to https://github.com/nathancox/queuedjobtest along with instructions to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants