Catch gear.InterruptedError
This is how gear lets us know that it has been stopped by another thread. Since we weren't catching these exceptions explicitly, they were polluting the logs on shutdown (especially in tests). Catch them and return immediately from the daemon run methods. Change-Id: I6f845566c759651e630d7f93c94dce975ad53d30
This commit is contained in:
@@ -100,6 +100,8 @@ class MergeServer(object):
|
||||
except Exception:
|
||||
self.log.exception("Exception while running job")
|
||||
job.sendWorkException(traceback.format_exc())
|
||||
except gear.InterruptedError:
|
||||
return
|
||||
except Exception:
|
||||
self.log.exception("Exception while getting job")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user