From a991db788e4d5fa67c54f937017f04097540a37d Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 15 Sep 2023 14:28:07 +1000 Subject: [PATCH] For AddressPoll, force using our file cache - seems sometimes the key doesnt release with memcached --- app/Jobs/AddressPoll.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Jobs/AddressPoll.php b/app/Jobs/AddressPoll.php index 8ebb2b8..8f41f1f 100644 --- a/app/Jobs/AddressPoll.php +++ b/app/Jobs/AddressPoll.php @@ -3,6 +3,7 @@ namespace App\Jobs; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Cache\Repository; use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -10,6 +11,7 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\ManuallyFailedException; use Illuminate\Queue\MaxAttemptsExceededException; use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Notification; @@ -87,6 +89,11 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique ]; } + public function uniqueVia(): Repository + { + return Cache::driver('file'); + } + /** * When calling MessageProcess - we assume that the packet is from a valid source */