mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-22 13:00:40 +08:00
buildbot: improve error handling
This commit is contained in:
parent
2e8ac27830
commit
91a8e844f5
1 changed files with 12 additions and 12 deletions
14
buildbot.py
14
buildbot.py
|
@ -482,19 +482,13 @@ if __name__ == '__main__':
|
||||||
__main() # start the Listener thread
|
__main() # start the Listener thread
|
||||||
logger.info('Listener started.')
|
logger.info('Listener started.')
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
ret = 1
|
ret = 1
|
||||||
ret = jobsmgr.tick()
|
ret = jobsmgr.tick()
|
||||||
except Exception:
|
except Exception:
|
||||||
try:
|
|
||||||
jobsmgr.clean_failed_job()
|
jobsmgr.clean_failed_job()
|
||||||
except Exception:
|
|
||||||
print_exc_plus()
|
print_exc_plus()
|
||||||
print_exc_plus()
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
logger.info('KeyboardInterrupt')
|
|
||||||
print_exc_plus()
|
|
||||||
break
|
|
||||||
if ret is None:
|
if ret is None:
|
||||||
sleep(1)
|
sleep(1)
|
||||||
elif ret == 0:
|
elif ret == 0:
|
||||||
|
@ -503,3 +497,9 @@ if __name__ == '__main__':
|
||||||
sleep(ret)
|
sleep(ret)
|
||||||
else:
|
else:
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
except Exception:
|
||||||
|
print_exc_plus()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
logger.info('KeyboardInterrupt')
|
||||||
|
print_exc_plus()
|
||||||
|
break
|
||||||
|
|
Loading…
Reference in a new issue