From 305060f79c6db6b30416b4ad31741b05d18988db Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 12 Feb 2022 22:46:50 +0100 Subject: [PATCH] Exceptions around saving snapshot were not being tracked --- changedetectionio/update_worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 1c6d6412..10a51ffc 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -134,8 +134,8 @@ class update_worker(threading.Thread): except Exception as e: # Catch everything possible here, so that if a worker crashes, we don't lose it until restart! - print("!!!! Exception in update_worker !!!\n", e) - + self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e)) + self.datastore.update_watch(uuid=uuid, update_obj={'last_error': str(e)}) finally: # Always record that we atleast tried self.datastore.update_watch(uuid=uuid, update_obj={'fetch_time': round(time.time() - now, 3),