From c607eb8895549cb3f896066586226ff71149c38d Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Thu, 21 Mar 2024 13:49:14 +0800 Subject: [PATCH] Setup priority queue with AWS SQS --- .../ControllersLogic/ListPackingListsJobLogic.php | 2 +- config/queue.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Classes/Modules/PackingLists/ControllersLogic/ListPackingListsJobLogic.php b/app/Classes/Modules/PackingLists/ControllersLogic/ListPackingListsJobLogic.php index 6cb92cea..64cb58d5 100644 --- a/app/Classes/Modules/PackingLists/ControllersLogic/ListPackingListsJobLogic.php +++ b/app/Classes/Modules/PackingLists/ControllersLogic/ListPackingListsJobLogic.php @@ -75,7 +75,7 @@ class ListPackingListsJobLogic extends AbstractControllerLogic // ListPackingListsJob::dispatch($listGenericJobObject)->onQueue('hellokitty2'); //cief todo: testing sqs // } // } - ListPackingListsJob::dispatch($listGenericJobObject)->onQueue('shipping-portal-high_priority'); + ListPackingListsJob::dispatch($listGenericJobObject)->onQueue(env('SQS_PREFIX', '').'high_priority'); $result = []; $result['job_id'] = $jobId; diff --git a/config/queue.php b/config/queue.php index 40781be3..d86a8f5b 100644 --- a/config/queue.php +++ b/config/queue.php @@ -34,10 +34,10 @@ return [ 'driver' => 'sync', ], - 'shipping-portal-high_priority' => [ + 'high_priority' => [ 'driver' => 'database', 'table' => 'jobs', - 'queue' => 'shipping-portal-high_priority', + 'queue' => 'high_priority', 'retry_after' => 3600, 'after_commit' => false, ],