From d2cae69d991234eef4df47f8f55a79153cf983de Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 4 Dec 2025 21:41:23 +0100 Subject: [PATCH] chore(config): configure laravel queues - use redis as the default queue connection - use the redis "jobs" connection for all queued jobs - set after_commit=true to ensure jobs wait for all DB transactions to finish before being dispatched - use pgsql database for job batches - remove logging of failed jobs into a DB table as we use horizon for that --- config/queue.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/config/queue.php b/config/queue.php index a188ff536..b390f2483 100644 --- a/config/queue.php +++ b/config/queue.php @@ -14,7 +14,7 @@ return [ | */ - 'default' => env('QUEUE_CONNECTION', 'database'), + 'default' => env('QUEUE_CONNECTION', 'redis'), /* |-------------------------------------------------------------------------- @@ -37,11 +37,11 @@ return [ 'redis' => [ 'driver' => 'redis', - 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), + 'connection' => env('REDIS_QUEUE_CONNECTION', 'jobs'), 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90), 'block_for' => null, - 'after_commit' => false, + 'after_commit' => true, ], ], @@ -57,7 +57,7 @@ return [ */ 'batching' => [ - 'database' => env('DB_CONNECTION', 'sqlite'), + 'database' => env('DB_CONNECTION', 'pgsql'), 'table' => 'job_batches', ], @@ -75,8 +75,6 @@ return [ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'database' => env('DB_CONNECTION', 'sqlite'), - 'table' => 'failed_jobs', + 'driver' => env('QUEUE_FAILED_DRIVER', 'null'), ], ];