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 queue:clear #6383

Merged
merged 4 commits into from
Sep 16, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- [Failed Job Events](#failed-job-events)
- [Retrying Failed Jobs](#retrying-failed-jobs)
- [Ignoring Missing Models](#ignoring-missing-models)
- [Clearing Jobs From Queues](#clearing-jobs-from-queues)
- [Job Events](#job-events)

<a name="introduction"></a>
Expand Down Expand Up @@ -1223,6 +1224,19 @@ For convenience, you may choose to automatically delete jobs with missing models
*/
public $deleteWhenMissingModels = true;

<a name="clearing-jobs-from-queues"></a>
## Clearing Jobs From Queues

If you would like to delete all jobs from the default queue of the default connection, you may do so using the `queue:clear` Artisan command:

php artisan queue:clear

You may also provide the `connection` argument and `queue` option to delete jobs from a non-default connection or a non-default queue:

php artisan queue:clear redis --queue=emails

> {note} Clearing jobs from queues is only available for the Redis and Database queue drivers.

paras-malhotra marked this conversation as resolved.
Show resolved Hide resolved
<a name="job-events"></a>
## Job Events

Expand Down