mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-13 00:11:05 +01:00
Optimized docker-compose-restart-unhealthy performance
This commit is contained in:
parent
07053bfd38
commit
1a51e8c734
@ -26,14 +26,14 @@ def print_bash(command):
|
||||
print(list_to_string(output))
|
||||
return output
|
||||
|
||||
waiting_time=1800
|
||||
waiting_time=600
|
||||
backup_running=True
|
||||
while backup_running:
|
||||
print("stop program for " + str(waiting_time) + "seconds.")
|
||||
time.sleep(waiting_time)
|
||||
try:
|
||||
bash("systemctl is-active --quiet docker-volume-backup.service")
|
||||
print("backup is running.")
|
||||
print("trying again in " + str(waiting_time) + " seconds.")
|
||||
time.sleep(waiting_time)
|
||||
except:
|
||||
backup_running=False
|
||||
print("no backup is running.")
|
||||
|
Loading…
Reference in New Issue
Block a user