File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/Illuminate/Queue/Console Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class RetryCommand extends Command
18
18
*/
19
19
protected $ signature = 'queue:retry
20
20
{id?* : The ID of the failed job or "all" to retry all jobs}
21
+ {--queue= : Name of the queue to be retried}
21
22
{--range=* : Range of job IDs (numeric) to be retried} ' ;
22
23
23
24
/**
@@ -62,6 +63,16 @@ protected function getJobIds()
62
63
return Arr::pluck ($ this ->laravel ['queue.failer ' ]->all (), 'id ' );
63
64
}
64
65
66
+ if ($ queue = $ this ->option ('queue ' )) {
67
+ $ ids = collect ($ this ->laravel ['queue.failer ' ]->all ())->where ('queue ' , $ queue )->pluck ('id ' )->toArray ();
68
+
69
+ if (count ($ ids )===0 ) {
70
+ $ this ->error ("Unable to find failed jobs in a queue named [ {$ queue }]. " );
71
+ }
72
+
73
+ return $ ids ;
74
+ }
75
+
65
76
if ($ ranges = (array ) $ this ->option ('range ' )) {
66
77
$ ids = array_merge ($ ids , $ this ->getJobIdsByRanges ($ ranges ));
67
78
}
You can’t perform that action at this time.
0 commit comments