Commit 850fa50c authored by Jędrzej Nowacki's avatar Jędrzej Nowacki Committed by Frederik Gladhorn
Browse files

Make sure we do not spawn too many processes on failure


Change-Id: I8e2d3f2fa3a914d53cd84b93c32ae5c4424b63d0
Reviewed-by: default avatarFrederik Gladhorn <frederik.gladhorn@digia.com>
parent 077827c7
No related merge requests found
Showing with 6 additions and 1 deletion
......@@ -382,10 +382,15 @@ def watcher():
except:
pass
except:
# an error occured let's restart in 15 sec
logging.critical("WATCHER RESTART because of: %s", sys.exc_info())
finally:
# an error occurred let's restart in 15 sec
import time
time.sleep(15)
try:
ssh.kill()
except: # swallow all errors, we do not care anymore
pass
if __name__== "__main__":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment