summaryrefslogtreecommitdiffstats
path: root/git-hooks/qdoc-bot
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@digia.com>2013-03-14 13:45:00 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-03-14 17:40:27 +0100
commit850fa50ca4e58593f4953fb3e55e1c8d47012310 (patch)
tree7022dcbf14f9f8887c2ba403df41d67f38f1295b /git-hooks/qdoc-bot
parent077827c78052f580b6ca770ab7da5f46869374a4 (diff)
Make sure we do not spawn too many processes on failure
Change-Id: I8e2d3f2fa3a914d53cd84b93c32ae5c4424b63d0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'git-hooks/qdoc-bot')
-rwxr-xr-xgit-hooks/qdoc-bot7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-hooks/qdoc-bot b/git-hooks/qdoc-bot
index 3a81bc9..fd959b4 100755
--- a/git-hooks/qdoc-bot
+++ b/git-hooks/qdoc-bot
@@ -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__":