Replies: 2 comments 7 replies
|
Another bad thing about using exception for postponing an activity is I want to really fail (and not retry) an activity if external API gives "failed" status as in this case something is really wrong with the processing. I don't see a nice way to retry an activity in case of Maybe I'm totally missing something, really appreciate any ideas. Thanks! |
4 replies
|
The way to do that is to have your activity return Under the hood, the |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, first of all thank you for the great package.
My question is: can I postpone an activity to later time without failing it?
I have a workflow which includes uploading a file to an external API, obtaining
task_id, and waiting for processing completion by periodically requesting processing status using obtainedtask_id. This periodic requesting is done as dedicated activity - when it is done, the workflow goes on (downloading result etc).So
CheckForCompletionActivitylogic is basically:task_idWhen I did this with regular Laravel chained jobs I could simply
return $this->release(60);inside a job and this job is reprocessed after 60 seconds without errors. But I can't do this with workflow + activity: when Ireturnanything the activity is considered finished and workflow goes on prematurely.What I can do now is throw
ProcessingIsNotDoneYetExceptionfrom the activity and set$backoffvalue. But I personally don't like it as this is not an error by nature, nothing is broken, I just need to retry the check later. My logs are full withActivityFailedevents and renderedProcessingIsNotDoneYetExceptionexceptions which is not error at all, so I have to tune$exceptions->dontReport()values. Also my queue worker hasFAILrows which are not failures...Looped
sleepis not an option of course as I don't want to lock queue worker.What did I miss? Can I retry/reschedule an activity later without failing it or throwing exceptions?
Thanks a lot!
All reactions