Skip to content

Commit c351a30

Browse files
committed
formatting
1 parent 3ccf3ef commit c351a30

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

src/Illuminate/Queue/Console/RetryCommand.php

+21-10
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,7 @@ protected function getJobIds()
6464
}
6565

6666
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);
7768
}
7869

7970
if ($ranges = (array) $this->option('range')) {
@@ -83,6 +74,26 @@ protected function getJobIds()
8374
return array_values(array_filter(array_unique($ids)));
8475
}
8576

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+
8697
/**
8798
* Get the job IDs ranges, if applicable.
8899
*

0 commit comments

Comments
 (0)