fix(jobs): update middleware to use expireAfter for WithoutOverlapping in multiple job classes

This commit is contained in:
Andras Bacsai
2025-07-01 10:50:27 +02:00
parent 2a2a99d256
commit 24688b2ad8
6 changed files with 7 additions and 7 deletions

View File

@@ -19,11 +19,11 @@ class ServerPatchCheckJob implements ShouldBeEncrypted, ShouldQueue
public $tries = 3;
public $timeout = 600; // 10 minutes timeout
public $timeout = 600;
public function middleware(): array
{
return [(new WithoutOverlapping('server-patch-check-'.$this->server->uuid))->dontRelease()];
return [(new WithoutOverlapping('server-patch-check-'.$this->server->uuid))->expireAfter(600)->dontRelease()];
}
public function __construct(public Server $server) {}