From 8b2f9a8708291ed43c2026013eecc8a4bb5ff982 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Dec 2022 08:22:15 +1100 Subject: [PATCH] Fixes for middle ware key --- app/Services/Bank/BankMatchingService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/Bank/BankMatchingService.php b/app/Services/Bank/BankMatchingService.php index dd15e5397745..02292fef432f 100644 --- a/app/Services/Bank/BankMatchingService.php +++ b/app/Services/Bank/BankMatchingService.php @@ -33,7 +33,7 @@ class BankMatchingService implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public function __construct(protected int $company_id, private string $db){} + public function __construct(public int $company_id, private string $db){} public function handle() :void { @@ -53,6 +53,8 @@ class BankMatchingService implements ShouldQueue public function middleware() { - return [new WithoutOverlapping("bank_match_rate:{$this->company_id}")]; + $middleware_key = "bank_match_rate:{$this->company_id}"; + + return [new WithoutOverlapping($middleware_key)]; } }