diff --git a/resallocserver/manager.py b/resallocserver/manager.py index 35a5b7a..353d650 100644 --- a/resallocserver/manager.py +++ b/resallocserver/manager.py @@ -453,7 +453,14 @@ def loop(self): def run(self): while True: - self.loop() + try: + self.loop() + except: # pylint: disable=bare-except + # We are a daemon thread that nobody restarts in case of + # unexpected failure, so let's try to recover :shrug:. If the + # parent dies, we get killed without any announcement, sounds + # fair. + app.log.exception("Watcher's logic raised exception, ignoring.") time.sleep(app.config["sleeptime"] / 2)