From bd49b17595519114887ae5ffad33a97b4fac51ef Mon Sep 17 00:00:00 2001 From: Luke Waite Date: Tue, 13 Dec 2022 21:41:24 -0500 Subject: [PATCH] Update queue loading --- src/BatchQueueServiceProvider.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/BatchQueueServiceProvider.php b/src/BatchQueueServiceProvider.php index f912c74..f8662e1 100644 --- a/src/BatchQueueServiceProvider.php +++ b/src/BatchQueueServiceProvider.php @@ -20,7 +20,19 @@ class BatchQueueServiceProvider extends ServiceProvider { public function register() { - $this->commands(QueueWorkBatchCommand::class); + $this->app->singleton( + 'command.queueawsbatch.work-batch', + function ($app) { + return new QueueWorkBatchCommand( + $app['queue'], + $app['queue.worker'], + $app['Illuminate\Foundation\Exceptions\Handler'], + $app['cache.store'] + ); + } + ); + + $this->commands('command.queueawsbatch.work-batch'); } public function boot()