From 66b41b3d4c916ace66c6b0d8fc64406b1867c0bb Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 20 Dec 2023 12:33:21 +0100 Subject: [PATCH] Update ServerStatusJob middleware and uniqueId() method --- app/Jobs/ServerStatusJob.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Jobs/ServerStatusJob.php b/app/Jobs/ServerStatusJob.php index c162d3bc3..2cdf4d547 100644 --- a/app/Jobs/ServerStatusJob.php +++ b/app/Jobs/ServerStatusJob.php @@ -17,17 +17,22 @@ class ServerStatusJob implements ShouldQueue, ShouldBeEncrypted use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public ?int $disk_usage = null; + public $tries = 4; + public function backoff(): int + { + return isDev() ? 1 : 3; + } public function __construct(public Server $server) { } public function middleware(): array { - return [(new WithoutOverlapping($this->server->id))->dontRelease()]; + return [(new WithoutOverlapping($this->server->uuid))]; } public function uniqueId(): int { - return $this->server->id; + return $this->server->uuid; } public function handle(): void