mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-11-15 18:40:23 +00:00
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:
1 parent
dce6f23cf9
commit
780c8dc8af
1 file changed
+5
-5
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user