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
fix: containerStatusJob
Andras Bacsai3a2d17bc055e
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.phpindex 368f76f8fb..0531899fe3 100644--- a/app/Console/Kernel.php+++ b/app/Console/Kernel.php@@ -40,8 +40,6 @@ class Kernel extends ConsoleKernelprivate function check_resources($schedule){$servers = Server::all()->where('settings.is_usable', true)->where('settings.is_reachable', true);- ray($servers);-foreach ($servers as $server) {$schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer();}diff --git a/app/Http/Livewire/Server/Proxy/Status.php b/app/Http/Livewire/Server/Proxy/Status.phpindex 9a88e23f2e..6eb198a4db 100644--- a/app/Http/Livewire/Server/Proxy/Status.php+++ b/app/Http/Livewire/Server/Proxy/Status.php@@ -18,10 +18,8 @@ class Status extends Componentpublic function getProxyStatus(){try {- if ($this->server->isFunctional()) {- dispatch_sync(new ContainerStatusJob($this->server));- $this->emit('proxyStatusUpdated');- }+ dispatch_sync(new ContainerStatusJob($this->server));+ $this->emit('proxyStatusUpdated');} catch (\Throwable $e) {return handleError($e, $this);}diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 6fe26498ed..6d27555f1c 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -28,11 +28,12 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncryptedpublic function __construct(public Server $server){+ $this->handle();}public function middleware(): array{- return [new WithoutOverlapping($this->server->uuid)];+ return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];}public function uniqueId(): stringdiff --git a/app/Notifications/Internal/GeneralNotification.php b/app/Notifications/Internal/GeneralNotification.phpindex d00432ca98..ddb5a553d3 100644--- a/app/Notifications/Internal/GeneralNotification.php+++ b/app/Notifications/Internal/GeneralNotification.php@@ -12,7 +12,7 @@ class GeneralNotification extends Notification implements ShouldQueue{use Queueable;- public $tries = 5;+ public $tries = 1;public function __construct(public string $message){}