Skip to content

Commit f6e16a9

Browse files
committed
Merge branch 'queue_clear' into 8.x
2 parents 69aa5a4 + fe918ab commit f6e16a9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

queues.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- [Failed Job Events](#failed-job-events)
3434
- [Retrying Failed Jobs](#retrying-failed-jobs)
3535
- [Ignoring Missing Models](#ignoring-missing-models)
36+
- [Clearing Jobs From Queues](#clearing-jobs-from-queues)
3637
- [Job Events](#job-events)
3738

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

1227+
<a name="clearing-jobs-from-queues"></a>
1228+
## Clearing Jobs From Queues
1229+
1230+
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:
1231+
1232+
php artisan queue:clear
1233+
1234+
You may also provide the `connection` argument and `queue` option to delete jobs from a specific connection and queue:
1235+
1236+
php artisan queue:clear redis --queue=emails
1237+
1238+
> {note} Clearing jobs from queues is only available for the SQS, Redis, and database queue drivers. In addition, the SQS message deletion process takes up to 60 seconds, so jobs sent to the SQS queue up to 60 seconds after you clear the queue might also be deleted.
1239+
12261240
<a name="job-events"></a>
12271241
## Job Events
12281242

0 commit comments

Comments
 (0)