From f82d3b648abbeb614fbf5f76f3e49c560c79df7b Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 14 Aug 2022 19:13:45 +0200 Subject: [PATCH] Crash protection - handle the case where watch was deleted while being checked (#833) --- changedetectionio/update_worker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index f9cd61de..131da6ea 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -194,6 +194,10 @@ class update_worker(threading.Thread): else: # Mark that we never had any failures update_obj['consecutive_filter_failures'] = 0 + + # Crash protection, the watch entry could have been removed by this point (during a slow chrome fetch etc) + if not self.datastore.data['watching'].get(uuid): + continue # Different exceptions mean that we may or may not want to bump the snapshot, trigger notifications etc if process_changedetection_results: