mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
Update container and server status job
This commit is contained in:
parent
cd842bc1b2
commit
5f2ad56529
@ -22,7 +22,7 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public $tries = 5;
|
public $tries = 4;
|
||||||
public function backoff(): int
|
public function backoff(): int
|
||||||
{
|
{
|
||||||
return isDev() ? 1 : 3;
|
return isDev() ? 1 : 3;
|
||||||
|
@ -34,9 +34,10 @@ public function handle(): void
|
|||||||
{
|
{
|
||||||
ray("checking server status for {$this->server->id}");
|
ray("checking server status for {$this->server->id}");
|
||||||
try {
|
try {
|
||||||
if ($this->server->isFunctional()) {
|
if (!$this->server->isServerReady(4)) {
|
||||||
$this->cleanup(notify: false);
|
throw new \RuntimeException('Server is not reachable.');
|
||||||
}
|
};
|
||||||
|
$this->cleanup(notify: false);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
|
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
|
||||||
ray($e->getMessage());
|
ray($e->getMessage());
|
||||||
|
Loading…
Reference in New Issue
Block a user