Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/queue/src/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@ class ListenCommand extends Command
*/
protected string $description = 'Listen to a given queue';

/**
* The queue listener instance.
*/
protected Listener $listener;

/**
* Create a new queue listen command.
*/
public function __construct(Listener $listener)
{
public function __construct(
protected ConfigInterface $config,
protected Listener $listener
) {
parent::__construct();

$this->setOutputHandler($this->listener = $listener);
Expand Down Expand Up @@ -77,9 +74,9 @@ public function handle()
*/
protected function getQueue(?string $connection): string
{
$connection = $connection ?: $this->app->get(ConfigInterface::class)->get('queue.default');
$connection = $connection ?: $this->config->get('queue.default');

return $this->input->getOption('queue') ?: $this->app->get(ConfigInterface::class)->get(
return $this->input->getOption('queue') ?: $this->config->get(
"queue.connections.{$connection}.queue",
'default'
);
Expand Down