Skip to content
Snippets Groups Projects
Commit a1afebcf authored by Florent Thiery's avatar Florent Thiery
Browse files

increase delay

parent 5ea501d2
No related branches found
No related tags found
No related merge requests found
...@@ -70,14 +70,15 @@ def test_backup_space(server): ...@@ -70,14 +70,15 @@ def test_backup_space(server):
def check_local_backup(path): def check_local_backup(path):
all_ok = True all_ok = True
backup_folder = os.path.dirname(path) backup_folder = os.path.dirname(path)
print('Checking %s' % backup_folder)
latest = os.path.join(backup_folder, 'latest') latest = os.path.join(backup_folder, 'latest')
if os.path.exists(latest): if os.path.exists(latest):
mtime = os.path.getmtime(latest) mtime = os.path.getmtime(latest)
d = datetime.fromtimestamp(mtime) d = datetime.fromtimestamp(mtime)
now = datetime.now() now = datetime.now()
diff_seconds = (now - d).total_seconds() diff_seconds = (now - d).total_seconds()
if diff_seconds > 25*3600: if diff_seconds > 48*3600:
print('Backup %s is older than a day' % backup_folder) print('Backup %s is older than 48h' % backup_folder)
all_ok = False all_ok = False
else: else:
print('Backup %s is fine' % backup_folder) print('Backup %s is fine' % backup_folder)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment