Skip to content

Commit d95fe95

Browse files
authored
feat: added detailed about for queue failover driver (#57582)
1 parent 844384a commit d95fe95

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Illuminate/Foundation/Console/AboutCommand.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,21 @@ protected function gatherApplicationInformation()
223223
},
224224
'Mail' => config('mail.default'),
225225
'Octane' => config('octane.server'),
226-
'Queue' => config('queue.default'),
226+
'Queue' => function ($json) {
227+
$queueConnection = config('queue.default');
228+
229+
if (config('queue.connections.'.$queueConnection.'.driver') === 'failover') {
230+
$secondary = new Collection(config('queue.connections.'.$queueConnection.'.connections'));
231+
232+
return value(static::format(
233+
value: $queueConnection,
234+
console: fn ($value) => '<fg=yellow;options=bold>'.$value.'</> <fg=gray;options=bold>/</> '.$secondary->implode(', '),
235+
json: fn () => $secondary->all(),
236+
), $json);
237+
}
238+
239+
return $queueConnection;
240+
},
227241
'Scout' => config('scout.driver'),
228242
'Session' => config('session.driver'),
229243
]));

0 commit comments

Comments
 (0)