Closed eehondas closed 5 years ago
Hi @eehondas, thank you for raising an issue. Sorry it's taken me a while to get to, I've been on annual leave.
The fact that it works when you manually process the queue is a bit confusing. The only thing that comes to mind here is that perhaps the cache in your CLI is not flushed? This could explain why processing the Job through the CMS works, but through CLI does not.
It might also be worth adding some logging to the Job to see what you get. In process()
, you could look to add some logging like:
// existing code
$target = $this->getTarget();
if ($target === null) {
$this->completeJob();
return;
}
// add debugging
Debug::dump($target->ClassName);
Debug::dump($target->hasExtension(EmbargoExpiryExtension::class));
Debug::dump(Extensible::get_extensions(StandardInnerPage::class));
Debug
is really just a sanity check, your error log already shows that it is a StandardInnerPage
, but I'm putting it there anyway in case something changes while you're working on a resolution.Debug
should be true
.Debug
should include EmbargoExpiryExtension
somewhere in the list of extensions from that class.You could try running the Job again through the CMS and CLI to see what the difference is.
Outputs should go to your log file (whatever you've set that up to be), and it should also be in the QueuedJobDescriptor
record in the database (I think it goes under the SavedJobMessages
field).
Out of curiosity, what version of SilverStripe are you using this on?
hey @chrispenny thank you so much. You were right on the dot. I manually cleaned the temporary cache of my webserver and it started working scheduled. Sorry for the issue it was clearly nothing to do with the module just my webserver that was failing to correctly invalidate the silverstripe-cache/ folder Thank you!
Hi @eehondas. Sweet! I'm glad that it's sorted for you now. Please don't hesitate to raise any new issues/questions that you might have.
Hello, First of all thanks for the module. I used the SS3 version of this module multiple times without a problem. I seem to have one with this one. I installed the module and applied the extension to SiteTree, the interface works fine: I can schedule publish and unpublish and clear them from the tab in page view. Problem comes when the scheduled job tries to execute from my Job queue: I always get a broken job state with the job spitting this out:
In this case my 'StandardInnerPage' is just my custom page type. I am positive the extension is applied because I'm able to add the scheduled publish / unpublish from the page view and also because I can run the job manually from the job queue without an error (correctly publishes unpublishes the page).
It sort of looks like the extension is not applied when the job runs from the ProcessJobQueueTask, however I have absolutely no idea why this happens. My other scheduled jobs are running fine.
Any insight on this or direction you can point me to? I'm using version 1.0.1
Thanks