Make unhandled exceptions not fatal
This commit removes a raise in the server class when it encounters an unhandled exception. Previously the exception would be logged and then it would raise it again, which would be fatal to the process. We encountered a DB connection issue a few weeks ago which shouldn't be fatal to the worker (just that one event/db connection) but this crashed the worker process. So this attempts to remedy this from happening in the future by not making this sort of failure fatal to the whole process. Maybe this isn't a good idea, but since the first time we encountered an unhandled exception being raised in the server class it brought down the worker for ~22 days. So the thought is instead of crashing just logging the failure and moving on is a better idea. However, if there is really a fatal exception being raised this means the process will never crash and just log it on each event. Change-Id: I4019831e24144205508f7918dab5c8fce6cfc74a
This commit is contained in:
parent
b5fd672701
commit
5813f6d125
@ -239,7 +239,6 @@ class Server(object):
|
||||
self.processor.handle_subunit_event()
|
||||
except:
|
||||
logging.exception("Exception processing log event.")
|
||||
raise
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
x
Reference in New Issue
Block a user