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 ability to clear queues #34330

Merged
merged 3 commits into from
Sep 16, 2020
Merged

[8.x] Add ability to clear queues #34330

merged 3 commits into from
Sep 16, 2020

Conversation

paras-malhotra
Copy link
Contributor

This PR adds the abilities to clear queues. Right now, if a user has to clear the queue, the implementation would depend on the queue driver and there's no easy way to do so with the framework. This would be very helpful in development (e.g. clear the queue right before re-seeding DB/refreshing migrations to avoid DB mismatch) and may also be helpful in production (in specific emergency cases).

It has been suggested many times in packages such as Horizon (laravel/horizon#328) and also I can see a lot of StackOverflow questions asking how to clear the queue in Laravel. I think if the framework directly supports this in the various drivers, it would be easier for packages like Horizon to extend the capability to clear queues and also very easy/convenient for Laravel users.

@taylorotwell taylorotwell merged commit 452826b into laravel:8.x Sep 16, 2020
@paras-malhotra paras-malhotra deleted the clear_queues branch September 16, 2020 13:59
@taylorotwell
Copy link
Member

Are you able to make a PR to laravel/horizon to ensure it works on there?

@paras-malhotra
Copy link
Contributor Author

sure @taylorotwell, I'll send across a PR to Horizon. Thanks!

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

3 participants