From f2b06c63bf387ebd5769f657e98de688140318fa Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 2 Apr 2021 03:58:23 +0200 Subject: [PATCH] Also check that the watch is not paused before putting it into the checking queuex --- backend/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/__init__.py b/backend/__init__.py index 72368e41..3f6f8a3d 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -598,9 +598,11 @@ def ticker_thread_check_time_launch_checks(): new_worker.start() while not app.config.exit.is_set(): + running_uuids = [] for t in running_update_threads: - running_uuids.append(t.current_uuid) + if t.current_uuid: + running_uuids.append(t.current_uuid) # Look at the dataset, find a stale watch to process @@ -609,7 +611,7 @@ def ticker_thread_check_time_launch_checks(): threshold = time.time() - (minutes * 60) for uuid, watch in datastore.data['watching'].items(): - if watch['last_checked'] <= threshold: + if not watch['paused'] and watch['last_checked'] <= threshold: if not uuid in running_uuids and uuid not in update_q.queue: update_q.put(uuid)