An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(jobs): unify middleware configuration to prevent job release after expiration for DockerCleanupJob and PushServerUpdateJob
Andras Bacsaic6278a06badc
diff --git a/app/Jobs/CleanupInstanceStuffsJob.php b/app/Jobs/CleanupInstanceStuffsJob.phpindex 60ae584897..53e344daf3 100644--- a/app/Jobs/CleanupInstanceStuffsJob.php+++ b/app/Jobs/CleanupInstanceStuffsJob.php@@ -23,7 +23,7 @@ class CleanupInstanceStuffsJob implements ShouldBeEncrypted, ShouldBeUnique, Shopublic function middleware(): array{- return [(new WithoutOverlapping('cleanup-instance-stuffs'))->expireAfter(60)->dontRelease()];+ return [(new WithoutOverlapping('cleanup-instance-stuffs'))->dontRelease()];}public function handle(): voiddiff --git a/app/Jobs/DockerCleanupJob.php b/app/Jobs/DockerCleanupJob.phpindex 7e246649d6..05a4aa8de2 100644--- a/app/Jobs/DockerCleanupJob.php+++ b/app/Jobs/DockerCleanupJob.php@@ -31,7 +31,7 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueuepublic function middleware(): array{- return [(new WithoutOverlapping($this->server->uuid))->expireAfter(600)];+ return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];}public function __construct(public Server $server, public bool $manualCleanup = false) {}diff --git a/app/Jobs/PushServerUpdateJob.php b/app/Jobs/PushServerUpdateJob.phpindex 4d40240f93..93b203fcbd 100644--- a/app/Jobs/PushServerUpdateJob.php+++ b/app/Jobs/PushServerUpdateJob.php@@ -71,7 +71,7 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueuepublic function middleware(): array{- return [(new WithoutOverlapping($this->server->uuid))->expireAfter(30)];+ return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];}public function backoff(): intdiff --git a/app/Jobs/RestartProxyJob.php b/app/Jobs/RestartProxyJob.phpindex a70ca518ca..7fc716f70c 100644--- a/app/Jobs/RestartProxyJob.php+++ b/app/Jobs/RestartProxyJob.php@@ -24,7 +24,7 @@ class RestartProxyJob implements ShouldBeEncrypted, ShouldQueuepublic function middleware(): array{- return [(new WithoutOverlapping($this->server->uuid))->expireAfter(60)->dontRelease()];+ return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];}public function __construct(public Server $server) {}diff --git a/app/Jobs/ServerCheckJob.php b/app/Jobs/ServerCheckJob.phpindex 6114021610..9818d5c6a0 100644--- a/app/Jobs/ServerCheckJob.php+++ b/app/Jobs/ServerCheckJob.php@@ -28,7 +28,7 @@ class ServerCheckJob implements ShouldBeEncrypted, ShouldQueuepublic function middleware(): array{- return [(new WithoutOverlapping($this->server->uuid))->expireAfter(60)->dontRelease()];+ return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];}public function __construct(public Server $server) {}