File tree 1 file changed +21
-10
lines changed
src/Illuminate/Queue/Console
1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,7 @@ protected function getJobIds()
64
64
}
65
65
66
66
if ($ queue = $ this ->option ('queue ' )) {
67
- $ ids = collect ($ this ->laravel ['queue.failer ' ]->all ())
68
- ->where ('queue ' , $ queue )
69
- ->pluck ('id ' )
70
- ->toArray ();
71
-
72
- if (count ($ ids ) === 0 ) {
73
- $ this ->error ("Unable to find failed jobs for queue [ {$ queue }]. " );
74
- }
75
-
76
- return $ ids ;
67
+ return $ this ->getJobIdsByQueue ($ queue );
77
68
}
78
69
79
70
if ($ ranges = (array ) $ this ->option ('range ' )) {
@@ -83,6 +74,26 @@ protected function getJobIds()
83
74
return array_values (array_filter (array_unique ($ ids )));
84
75
}
85
76
77
+ /**
78
+ * Get the job IDs by queue, if applicable.
79
+ *
80
+ * @param string $queue
81
+ * @return array
82
+ */
83
+ protected function getJobIdsByQueue ($ queue )
84
+ {
85
+ $ ids = collect ($ this ->laravel ['queue.failer ' ]->all ())
86
+ ->where ('queue ' , $ queue )
87
+ ->pluck ('id ' )
88
+ ->toArray ();
89
+
90
+ if (count ($ ids ) === 0 ) {
91
+ $ this ->error ("Unable to find failed jobs for queue [ {$ queue }]. " );
92
+ }
93
+
94
+ return $ ids ;
95
+ }
96
+
86
97
/**
87
98
* Get the job IDs ranges, if applicable.
88
99
*
You can’t perform that action at this time.
0 commit comments