[11.x] Pass the limiter to the when & report callbacks - #56129
Merged
taylorotwell merged 1 commit intoJun 25, 2025
Conversation
Contributor
Author
|
Thanks! Looking forward to the next release. |
GrahamCampbell
added a commit
that referenced
this pull request
Jul 1, 2025
This reverts commit 372a22a.
taylorotwell
pushed a commit
that referenced
this pull request
Jul 1, 2025
GrahamCampbell
added a commit
that referenced
this pull request
Jul 1, 2025
Collaborator
|
@jimmypuckett This has been reverted on 11.x. 11.x is only taking bug and security fixes at this time. I've re-created this PR for 12.x at #56187. |
taylorotwell
pushed a commit
that referenced
this pull request
Jul 1, 2025
mohammad-fouladgar
pushed a commit
to mohammad-fouladgar/framework
that referenced
this pull request
Jul 22, 2025
mohammad-fouladgar
pushed a commit
to mohammad-fouladgar/framework
that referenced
this pull request
Jul 22, 2025
…" (laravel#56184) This reverts commit 372a22a.
mohammad-fouladgar
pushed a commit
to mohammad-fouladgar/framework
that referenced
this pull request
Jul 22, 2025
…vel#56129)" (laravel#5…" (laravel#56187) This reverts commit 59ca3d1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It would be nice to have the limiter in the when & report callbacks to expand the logic in the closures to give a bit more control.
Here is a use case:
I want to give the job the maxAttempts to recover, but on that last try, it would be nice to report what is happening. I would like not to report the attempts 1...(max - 1), but on max, I would like to report. If I had the limiter in my closure, then I would know when to return true. This would keep the logs clean for the occasional exception that self-recover.
I have started a discussion on this at #56128, but then I thought that would make the simple PR.
I did not see where the tests were making any assertions about the parameters being passed, so I did not make any test changes. However, I will be happy to expand them if needed.