mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-19 04:49:19 +00:00
add resilience
This commit is contained in:
@@ -59,11 +59,12 @@ def work_once():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
work_loop()
|
||||
except:
|
||||
log.exception("In work loop:")
|
||||
log.error("Waiting 10s and restarting.")
|
||||
time.sleep(10)
|
||||
while True:
|
||||
try:
|
||||
work_loop()
|
||||
except:
|
||||
log.exception("In work loop:")
|
||||
log.error("Waiting 10s and restarting.")
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user