-
Notifications
You must be signed in to change notification settings - Fork 11.7k
feat: added detailed about for queue failover driver #57582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added detailed about for queue failover driver #57582
Conversation
| 'Queue' => function ($json) { | ||
| $queueConnection = config('queue.default'); | ||
|
|
||
| if (config('queue.connections.'.$queueConnection.'.driver') === 'failover') { | ||
| $secondary = new Collection(config('queue.connections.'.$queueConnection.'.connections')); | ||
|
|
||
| return value(static::format( | ||
| value: $queueConnection, | ||
| console: fn ($value) => '<fg=yellow;options=bold>'.$value.'</> <fg=gray;options=bold>/</> '.$secondary->implode(', '), | ||
| json: fn () => $secondary->all(), | ||
| ), $json); | ||
| } | ||
|
|
||
| return $queueConnection; | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, we could extract this logic into a separate method, so that we can reuse it here as well as for the 'Cache' and the 'Logs' case above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking we let this go for now and we can consider the whole refactor later, because I intend to make a similar PR for mail as well, the internal key structure is not very symetrical and we will need to pass each wrapper key in that.
This will be for logging, cache, queue (current PR) and mail (future PR).
|
Are this PR and #57579 related? |
At first I did that for cache and later on realised, it was added to queue as well. hence this PR. |
|
Ah, great—thanks for the explanation 👍🏻 |
This pull request updates the way queue connection information is displayed in the
AboutCommandoutput. Specifically, it enhances the reporting for queue connections that use thefailoverdriver by showing both the primary and secondary connections.Improvements to queue connection reporting:
Queueentry ingatherApplicationInformation()insrc/Illuminate/Foundation/Console/AboutCommand.phpto display both the main and secondary connections when thefailoverdriver is used, providing clearer visibility into queue configuration.Before:
After: