bundles/backup-server: fix stupid in check_backup_for_node
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
e909144544
commit
931d566736
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ NODE = argv[1]
|
||||||
ONE_BACKUP_EVERY_HOURS = int(argv[2])
|
ONE_BACKUP_EVERY_HOURS = int(argv[2])
|
||||||
|
|
||||||
NOW = int(time())
|
NOW = int(time())
|
||||||
DAY_SECONDS = 60 * 60 * 24
|
HOUR_SECONDS = 60 * 60
|
||||||
|
|
||||||
snaps = set()
|
snaps = set()
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ try:
|
||||||
# One day without backups is still okay. There may be fluctuations
|
# One day without backups is still okay. There may be fluctuations
|
||||||
# because of transfer speed, amount of data, changes in backup
|
# because of transfer speed, amount of data, changes in backup
|
||||||
# schedule etc.
|
# schedule etc.
|
||||||
if delta > (DAY_SECONDS * (ONE_BACKUP_EVERY_HOURS + 2)):
|
if delta > ((HOUR_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)) + (HOUR_SECONDS*24)):
|
||||||
exit(2)
|
exit(2)
|
||||||
elif delta > (DAY_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)):
|
elif delta > (HOUR_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)):
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
Loading…
Reference in a new issue