Skip to content

Commit 241e758

Browse files
authored
Merge pull request #38 from hypervel/hotfix/fix-queue-listen-command
fix: fix depenedencies injection in other queue commands
2 parents 2f43486 + 1595dde commit 241e758

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/queue/src/Console/MonitorCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class MonitorCommand extends Command
3838
*/
3939
public function __construct(
4040
protected Factory $manager,
41-
protected EventDispatcherInterface $events
41+
protected EventDispatcherInterface $events,
42+
protected ConfigInterface $config,
4243
) {
4344
parent::__construct();
4445
}
@@ -66,7 +67,7 @@ protected function parseQueues($queues): Collection
6667

6768
if (! isset($queue)) {
6869
$queue = $connection;
69-
$connection = $this->app->get(ConfigInterface::class)->get('queue.default');
70+
$connection = $this->config->get('queue.default');
7071
}
7172

7273
return [

src/queue/src/Console/RetryCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Hypervel\Queue\Events\JobRetryRequested;
1515
use Hypervel\Queue\Failed\FailedJobProviderInterface;
1616
use Hypervel\Support\Traits\HasLaravelStyleCommand;
17+
use Psr\Container\ContainerInterface;
1718
use Psr\EventDispatcher\EventDispatcherInterface;
1819
use RuntimeException;
1920
use stdClass;
@@ -39,6 +40,7 @@ class RetryCommand extends Command
3940
* Create a new queue restart command.
4041
*/
4142
public function __construct(
43+
protected ContainerInterface $app,
4244
protected FailedJobProviderInterface $failer
4345
) {
4446
parent::__construct();

0 commit comments

Comments
 (0)