mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
Optimized docker-compose-restart-unhealthy performance
This commit is contained in:
parent
d159457e65
commit
d56b5847a2
@ -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