Pause Queue - Best to pause it in the watch loop so that it works with very long lists of watches

This commit is contained in:
dgtlmoon committed 2026-09-01 17:45:51 +02:00
1 parent dce6f23cf9
commit 780c8dc8af
1 file changed
+5 -5
+5 -5
View File
@@ -1269,11 +1269,6 @@ def ticker_thread_check_time_launch_checks():
last_health_check = now
# Check if all checks are paused
if datastore.data['settings']['application'].get('all_paused', False):
app.config.exit.wait(1)
continue
# Get a list of watches by UUID that are currently fetching data
running_uuids = worker_pool.get_running_uuids()
@@ -1307,6 +1302,11 @@ def ticker_thread_check_time_launch_checks():
logger.debug(f"Queue size limit reached ({current_queue_size}/{MAX_QUEUE_SIZE}), stopping scheduler this iteration.")
break
# Check if all checks are paused - this loop could get stuck on very long lists of watches, best to check here.
if datastore.data['settings']['application'].get('all_paused', False):
app.config.exit.wait(1)
break
now = time.time()
watch = datastore.data['watching'].get(uuid)
if not watch: