-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Job is retried even when tries is set to 1 for queue:work #15696
Comments
This is the expected behaviour. If a job times out, it is run for the first time again, or whatever time it was at. |
Make sure you set the timeout correctly to prevent this. |
Fair enough. But this does seemed to have changed from 5.2. Not sure if that was a Regardless, what is the correct |
I'm seeing this problem too... And i agree with @jasonmccreary that this looks odd. If we have a job I think the way we handle timeouts can be better handled maybe here: https://github.com/laravel/framework/blob/5.5/src/Illuminate/Queue/Worker.php#L140 Like doing the logic to check job, fail, instead of simply exiting here and doing all the logic on the next try. |
I agree with @dbpolito. As a possibile solution, I am thinking about a default |
Same here, very strange behavior. Isn't there an option to disable retry_after at all? |
I did |
Laravel 8.x and this seems to behave still like this. Like other params, retry_after should be able to override in job instead of setting a ridiculous high value. |
Description:
My job is getting retried even though the
--tries
option forqueue:work
is set to 1. While the job is longer running than theretry_after
value, I would expect the Job to fail rather than be retried given thattries
is1
.It's worth noting that my queue did not behave this way in Laravel 5.2. For now, I have set my
retry_after
to3600
. But this seems hackish. At the least, I'd prefer to set this to something like0
to indicate do not retry.Steps To Reproduce:
Queue a job that runs longer than your
retry_after
value.The text was updated successfully, but these errors were encountered: