bundles/backup-server: do not alert for one missing day of backups
kunsi/bundlewrap/pipeline/head There was a failure building this commit Details

This commit is contained in:
Franzi 2022-01-09 08:26:08 +01:00
parent 5df546754f
commit 5b2e5fc838
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
1 changed files with 5 additions and 2 deletions

View File

@ -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)