
Changing the queue used by Laravel Scout
9 Jul 2022 #development #laravel #php #scout
When using Laravel Scout for doing full-text search indexing, you might want to use a separate queue for the indexing.
To do so, edit config/scout.php
and change the key queue
from (document here):
return [ // ... 'queue' => true, // ...];
to:
return [ // ... 'queue' => [ 'connection' => null, 'queue' => env('SCOUT_QUEUE_NAME', 'default'), ], // ...];
The connection will default to default
if it contains a null value, the queue will be taken from the environment variables and defaults to default
.
All you then need to do is to specify the name of the queue you want to use using an environment variable:
SCOUT_QUEUE_NAME=my-scout-queue