From 4ed4b43ce0d84b4a7ca0ca7d837cf75715205afc Mon Sep 17 00:00:00 2001 From: iLyas Farawe Date: Fri, 22 Aug 2025 06:31:20 +0100 Subject: [PATCH] fix(scout): Add configurable queue connection and queue name options --- config/scout.php | 4 ++++ src/Console/QueueImportCommand.php | 2 +- src/Searchable.php | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/scout.php b/config/scout.php index e8a3bdda..79620330 100644 --- a/config/scout.php +++ b/config/scout.php @@ -44,6 +44,10 @@ 'queue' => env('SCOUT_QUEUE', false), + 'queue_connection' => env('SCOUT_QUEUE_CONNECTION'), + + 'queue_name' => env('SCOUT_QUEUE_NAME'), + /* |-------------------------------------------------------------------------- | Database Transactions diff --git a/src/Console/QueueImportCommand.php b/src/Console/QueueImportCommand.php index 14493518..97178840 100644 --- a/src/Console/QueueImportCommand.php +++ b/src/Console/QueueImportCommand.php @@ -19,7 +19,7 @@ class QueueImportCommand extends Command {--min= : The minimum ID to start queuing from} {--max= : The maximum ID to queue up to} {--c|chunk= : The number of records to queue in a single job (Defaults to configuration value: `scout.chunk.searchable`)} - {--queue= : The queue that should be used (Defaults to configuration value: `scout.queue.queue`)}'; + {--queue= : The queue that should be used (Defaults to configuration value: `scout.queue_name`)}'; /** * The console command description. diff --git a/src/Searchable.php b/src/Searchable.php index e7c64f66..0c36cd36 100644 --- a/src/Searchable.php +++ b/src/Searchable.php @@ -413,7 +413,7 @@ public function searchableUsing() */ public function syncWithSearchUsing() { - return config('scout.queue.connection') ?: config('queue.default'); + return config('scout.queue_connection') ?: config('queue.default'); } /** @@ -423,7 +423,7 @@ public function syncWithSearchUsing() */ public function syncWithSearchUsingQueue() { - return config('scout.queue.queue'); + return config('scout.queue_name'); } /**