Fix server status check and cleanup logic
This commit is contained in:
parent
5f2ad56529
commit
c41cfe2a2f
1 changed files with 6 additions and 4 deletions
|
|
@ -33,11 +33,13 @@ public function uniqueId(): int
|
|||
public function handle(): void
|
||||
{
|
||||
ray("checking server status for {$this->server->id}");
|
||||
if (!$this->server->isServerReady(4)) {
|
||||
throw new \RuntimeException('Server is not reachable.');
|
||||
};
|
||||
try {
|
||||
if (!$this->server->isServerReady(4)) {
|
||||
throw new \RuntimeException('Server is not reachable.');
|
||||
};
|
||||
$this->cleanup(notify: false);
|
||||
if ($this->server->isFunctional()) {
|
||||
$this->cleanup(notify: false);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
|
||||
ray($e->getMessage());
|
||||
|
|
|
|||
Loading…
Reference in a new issue