Add unreachable notification when server is unreachable in Server.php
This commit is contained in:
parent
3f9833117e
commit
a8ddf4c2df
@ -762,6 +762,11 @@ public function validateConnection()
|
||||
$server->settings()->update([
|
||||
'is_reachable' => false,
|
||||
]);
|
||||
if (data_get($server, 'unreachable_notification_sent') === false) {
|
||||
ray('Server unreachable, sending notification...');
|
||||
$this->team?->notify(new Unreachable($this));
|
||||
$this->update(['unreachable_notification_sent' => true]);
|
||||
}
|
||||
return ['uptime' => false, 'error' => $e->getMessage()];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user