From 9b5787bef23e4bcaf8489012dd1985765da4b43b Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 23 Sep 2023 10:16:59 +0000 Subject: [PATCH] Refactoring --- src/Queue/Adapters/DatabaseAdapter.php | 2 +- src/Queue/Adapters/SQSAdapter.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Queue/Adapters/DatabaseAdapter.php b/src/Queue/Adapters/DatabaseAdapter.php index a25ce2de..83b5fb1c 100644 --- a/src/Queue/Adapters/DatabaseAdapter.php +++ b/src/Queue/Adapters/DatabaseAdapter.php @@ -105,7 +105,7 @@ public function run(string $queue = null): void $this->sleep(1); continue; } - + // Execute the onException method for notify the producer // and let developper to decide if the job should be delete $producer->onException($e); diff --git a/src/Queue/Adapters/SQSAdapter.php b/src/Queue/Adapters/SQSAdapter.php index 59c9cd6f..4d2ebc71 100644 --- a/src/Queue/Adapters/SQSAdapter.php +++ b/src/Queue/Adapters/SQSAdapter.php @@ -129,7 +129,8 @@ public function run(?string $queue = null): void app('logger')->error($e->getMessage(), $e->getTrace()); if (isset($message)) { - cache("job:failed:" . $message["ReceiptHandle"], + cache( + "job:failed:" . $message["ReceiptHandle"], $message["Body"] ); }