fix(server): enhance error handling in server patch check notifications

This commit is contained in:
Andras Bacsai
2025-05-27 14:23:16 +02:00
parent 6868ba088c
commit e005f1c838
3 changed files with 119 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ class ServerPatchCheckJob implements ShouldBeEncrypted, ShouldQueue
public function handle(): void
{
try {
if ($this->server->isFunctional() === false) {
if ($this->server->serverStatus() === false) {
return;
}
@@ -44,6 +44,8 @@ class ServerPatchCheckJob implements ShouldBeEncrypted, ShouldQueue
$patchData = CheckUpdates::run($this->server);
if (isset($patchData['error'])) {
$team->notify(new ServerPatchCheck($this->server, $patchData));
return; // Skip if there's an error checking for updates
}