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 */