Job Deletion #95
-
Hello, Thanks for the great package. I am having a really strange issue where a job processed, works but on the cleanup in Laravel within
The above is the offending line, the job is not set to deleted in Laravel and when it calls for the first time it returns the following error:-
It then kicks into the retry flow which in turn then produces the same error as the job isn't on Google Cloud. Everything works otherwise, it just means every job is appearing as failed when infact Google successfully processed it. I wanted to put this in here first rather than an issue incase it was something on Googles side. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Giving this a further test, google is self deleting the tasks on successful completion. Updating
to
seems to resolve the issue, the delete flow being kept in for the retries, as without it the retries attempt indefinetley. I'm unsure if this is a google side configuration issue, but I can't see anything, so wondering if this is an actual issue that I can put a PR in for? |
Beta Was this translation helpful? Give feedback.
-
Thank you!
Indeed! And the Laravel Anyway, thanks for the code sample! I expanded on it a little bit. It (I assume) checks if the job has reached it's maximum number of tries and if it has, allows it to be deleted. There are two more things that should be checked too:
If any of the 3 are true, then the job is marked as failed. So I've just used the Love to hear your thoughts on this. By the way, what kind of set up are you using to reproduce this issue? Because I haven't been able to reproduce it so far. |
Beta Was this translation helpful? Give feedback.
-
Hello @AlexJump24 and @i386, I've released the version The first fix ensures that Cloud Tasks, rather than Laravel, deletes the task (if it was processed successfully). This will help to avoid the duplicate deletion of tasks. The second fix addresses a bug I found while fixing the other one: the package could theoretically execute a task even if it no longer existed in Cloud Tasks. This issue should now also be resolved. I wasn't able to reproduce the "NOT_FOUND" issue myself, so I can't guarantee that they will work. Please let me know if this version works (or not) :-) One more thing to note is that to download this version, you will need to set "minimum-stability" to at least "RC" in your composer.json file. Some more info: https://getcomposer.org/doc/04-schema.md#minimum-stability |
Beta Was this translation helpful? Give feedback.
-
Putting this into production now @marickvantuil :) |
Beta Was this translation helpful? Give feedback.
-
I've been getting this same error on production, I can replicate it more easily when you run chained jobs that are long running. So i'll try the RC version and see if it fixes the issue 👍 |
Beta Was this translation helpful? Give feedback.
-
Ah that's great to hear! I just tagged v3.4.1. Thanks for testing @AlexJump24 @i386 @Kyon147 |
Beta Was this translation helpful? Give feedback.
Hello @AlexJump24 and @i386,
I've released the version
v3.4.1-rc1
with two fixes.The first fix ensures that Cloud Tasks, rather than Laravel, deletes the task (if it was processed successfully). This will help to avoid the duplicate deletion of tasks.
The second fix addresses a bug I found while fixing the other one: the package could theoretically execute a task even if it no longer existed in Cloud Tasks. This issue should now also be resolved.
I wasn't able to reproduce the "NOT_FOUND" issue myself, so I can't guarantee that they will work. Please let me know if this version works (or not) :-)
One more thing to note is that to download this version, you will need to set "minimum-stabi…