bundles/backup-server: do not alert for one missing day of backups
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
5df546754f
commit
5b2e5fc838
1 changed files with 5 additions and 2 deletions
|
@ -42,9 +42,12 @@ try:
|
|||
datetime.fromtimestamp(last_snap).strftime('%Y-%m-%d %H:%M:%S'),
|
||||
))
|
||||
|
||||
if delta > (DAY_SECONDS * 2):
|
||||
# One day without backups is still okay. There may be fluctuations
|
||||
# because of transfer speed, amount of data, changes in backup
|
||||
# schedule etc.
|
||||
if delta > (DAY_SECONDS * 3):
|
||||
exit(2)
|
||||
elif delta > DAY_SECONDS:
|
||||
elif delta > (DAY_SECONDS * 2):
|
||||
exit(1)
|
||||
else:
|
||||
exit(0)
|
||||
|
|
Loading…
Reference in a new issue