-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[5.8] Fail job immediately after it timeouts if it wont be retried #29024
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
Conversation
@themsaid can you rebase with 5.8 branch? Build should pass after that. |
9287b23
to
c126390
Compare
Since this commit Im getting null pointer exceptions: "Call to a member function getConnectionName() on null" in "/laravel/framework/src/Illuminate/Queue/Worker.php:144" This commit changes the method "registerTimeoutHandler($job, WorkerOptions $options)" and calls "getConnectionName()" on "$job" in the registered signal handler for the alarm handler. As declared in the doc-param "$job" could be null, but imo its not handled appropriately. Marked in Source: c126390#diff-b0152e2539005c772b52151cc5d4aa60R144 |
That's interesting. Yes, Anyways, simply checking that |
|
We recently noticed that we weren't getting the MaxAttempt exceptions in our error logging anymore. As it turns out there is a discrepancy between Since timeouts are now handled "differently" due to this PR, using the first method, there no longer is that automatic error reporting. Is this a deliberate difference between the methods, or is it an oversight and should |
Here's the scenario:
So currently a timed out job will wait after the retry_after period to pass before it can be reported as failed even if there are no retries remained.
This PR will fail the job immediately if there are no more retries left, same as when the job throws an exception, we fail it immediately if we won't be retrying it anymore.