Replies: 1 comment
-
Running into the same issue in 2024. I'd love a different exception for this or for it to somehow be reflected in the JobFailed event at least. |
Beta Was this translation helpful? Give feedback.
0 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.
-
What
It's possible to dispatch jobs that will fail without a single successful (or failing due to other factors) try due to a time based attempts check. This can happen either by setting up the
retryUntil
property into the past, or by setting up aretryUntil
to a time sooner than what the job is delayed.https://laravel.com/docs/9.x/queues#delayed-dispatching
https://laravel.com/docs/9.x/queues#time-based-attempts
Why
A new exception could be thrown checking to ensure that a delayed or pushed job with time based attempts can be run at least once. It would make the feedback loop of catching this particular type of issues quicker during development and in production.
My suggestion
I've come up with a prototype, https://github.com/mikkoaf/framework/tree/available-after-retry-until
I've already covered that closures and jobs that return no expiration time will pass, and it is implicitly tested with the existing testcases using strings as jobs.
However, I am hesitant to create a pull request just yet as I have to figure out a few things.
fail()
method running.framework/src/Illuminate/Queue/Queue.php
Line 302 in 8f82cf9
Beta Was this translation helpful? Give feedback.
All reactions