Skip to content

Commit

Permalink
Update SnapshooterCheck.php
Browse files Browse the repository at this point in the history
  • Loading branch information
roblesterjr04 committed Jan 2, 2024
1 parent d175f03 commit 991c06f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Checks/Checks/SnapshooterCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SnapshooterCheck extends Check
{
public function run(): Result
{
$result = Result::make();
$key = config('health-exp.snapshooter.secret') ?: 'ss-secret';

$jobs = Http::withToken($key)
Expand All @@ -31,11 +32,11 @@ public function run(): Result
$status = $backup["status"] ?? "failed";

if ($status != 'complete') {
return $this->failedResult();
return $result->failed($job['name'] ?? 'BACKUP FAILED');
}
}

return Result::make()->ok();
return $result->ok();
}

}

0 comments on commit 991c06f

Please sign in to comment.