We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca37dee commit 2e41c06Copy full SHA for 2e41c06
src/HealthySqlDump.php
@@ -43,11 +43,17 @@ public function checkHealth(BackupDestination $backupDestination)
43
return;
44
}
45
46
- Cache::put($key, false, now()->addWeek());
+ try {
47
+ Cache::put($key, true, now()->addHour()); // Ensure we don't start multiple checks simultaneously
48
- $this->performCheck($backupDestination, $newestBackup);
49
+ $this->performCheck($backupDestination, $newestBackup);
50
- Cache::put($key, true, now()->addWeek());
51
+ Cache::put($key, true, now()->addWeek());
52
+ } catch (\Exception $exception) {
53
+ Cache::put($key, false, now()->addWeek());
54
+
55
+ throw $exception;
56
+ }
57
58
59
/**
0 commit comments