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

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

View file

@ -42,9 +42,12 @@ try:
datetime.fromtimestamp(last_snap).strftime('%Y-%m-%d %H:%M:%S'), 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) exit(2)
elif delta > DAY_SECONDS: elif delta > (DAY_SECONDS * 2):
exit(1) exit(1)
else: else:
exit(0) exit(0)