Skip to content
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

[8.x] Add dontRelease option to RateLimited and RateLimitedWithRedis job middleware #35010

Merged
merged 1 commit into from
Oct 28, 2020
Merged

[8.x] Add dontRelease option to RateLimited and RateLimitedWithRedis job middleware #35010

merged 1 commit into from
Oct 28, 2020

Conversation

paras-malhotra
Copy link
Contributor

@paras-malhotra paras-malhotra commented Oct 28, 2020

Similar to the WithoutOverlapping middleware, this PR adds the dontRelease option to RateLimited job middleware like so:

public function middleware()
{
    return [(new RateLimited('backups'))->dontRelease()];
}

If the dontRelease method is called, the job is not released back to the queue when the limit is exceeded.

@taylorotwell taylorotwell merged commit 00d4739 into laravel:8.x Oct 28, 2020
@paras-malhotra paras-malhotra deleted the dont_release_option branch October 28, 2020 21:36
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

Successfully merging this pull request may close these issues.

None yet

2 participants