Skip to content

Job using "X-CloudTasks-TaskExecutionCount" instead of "x-cloudtasks-taskretrycount" for attempts #55

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

Closed
mbreithu-wtd opened this issue Jun 20, 2022 · 1 comment

Comments

@mbreithu-wtd
Copy link

mbreithu-wtd commented Jun 20, 2022

In v3.x of this package, the task handler (TaskHandler.php:98) sets the header X-CloudTasks-TaskExecutionCount as the jobs attempt count. But according to the documentation, the execution count is only incremented when the task was processed, returned a response in time, and the response code is not in the 5xx code range.
In cases where the task execution returns 5xx, the retry count is incremented, but the execution count is not.

Those cases might lead to failed tasks not being stored in the failed jobs table, because the job still has attempts < maxAttempts.

Task not being stored in the failed jobs table can be reproduced by creating a job which simply does
'abort(500)' vs a job that does 'abort(404)'

@marickvantuil
Copy link
Member

Thanks a lot for the bug reports! I have fixed both in v3.1.4.

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

No branches or pull requests

2 participants