From 95677c58b0ffe6be4777778e891ab19876e97a13 Mon Sep 17 00:00:00 2001 From: Andreas Berthoud Date: Tue, 17 Aug 2021 17:49:46 +0200 Subject: [PATCH] backend: Recover from error during enter_fsm() --- backend/monsun_backend/command_execution.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/monsun_backend/command_execution.py b/backend/monsun_backend/command_execution.py index 0e73fa4..a531eee 100644 --- a/backend/monsun_backend/command_execution.py +++ b/backend/monsun_backend/command_execution.py @@ -95,6 +95,9 @@ def worker_process( connected = False time.sleep(serial_reconnection_wait_timeout) logger.warning("reconnecting...") + except Exception as e: + logger.exception(e) + logger.error("Unexpected exception happened, recovering...") def enter_fsm(