chg: Catch exceptions in the main loop
parent
595fa671d7
commit
76ec7ff379
|
@ -23,7 +23,10 @@ class AbstractManager(ABC):
|
|||
while True:
|
||||
if shutdown_requested():
|
||||
break
|
||||
try:
|
||||
self._to_run_forever()
|
||||
except Exception:
|
||||
self.logger.exception('Something went terribly wrong in {}.'.format(self.__class__.__name__))
|
||||
if not long_sleep(sleep_in_sec):
|
||||
break
|
||||
self.logger.info('Shutting down {}'.format(self.__class__.__name__))
|
||||
|
|
Loading…
Reference in New Issue