Skip to content

Commit

Permalink
fix attempt #184
Browse files Browse the repository at this point in the history
  • Loading branch information
irfan-dahir committed Jan 26, 2022
1 parent e08c8d0 commit 6d34d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Listeners/SourceHeartbeatListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ private function getLastFailoverLockTimestamp()

private function getRecentFails()
{
$fails = [];

try {
$failsJson = Storage::get('failovers.json');
$fails = json_decode($failsJson, true);
} catch (\Exception $e) {
}

$fails = $fails ?? [];

// remove any fails greater than SOURCE_BAD_HEALTH_RANGE
foreach ($fails as $fail) {

Expand Down

0 comments on commit 6d34d1e

Please sign in to comment.