From 87d00a54b212769794e60416529970c26f95dcff Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 02:40:31 +0000 Subject: [PATCH] revert: keep starting the RQ streaming worker unconditionally Reading streaming.enabled from config.yml in the init script couples the shell to the YAML config, and the worker's isolation is what keeps a slow teardown or exit save pull off the shared task worker (#4632). The worker stays always-on; its idle cost is reduced separately by slimming what RQ worker parents import. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Gh1SRMfuK7BZmf6YxMqSyT --- docker/init_scripts/init | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/docker/init_scripts/init b/docker/init_scripts/init index 7b7ea0534..44435aa75 100755 --- a/docker/init_scripts/init +++ b/docker/init_scripts/init @@ -263,7 +263,7 @@ start_bin_rq_cron() { # Commands to start RQ worker start_bin_rq_worker() { info_log "Starting RQ worker" - start_rq_worker rq_worker "${RQ_WORKER_QUEUES[@]}" + start_rq_worker rq_worker high default low } # Scans get a worker of their own, see SCAN_QUEUE_NAME. @@ -414,22 +414,6 @@ fi # Startup process requires database and cache to be already available run_startup -# The streaming worker only runs streaming teardowns and exit save pulls. With -# streaming off at boot (exit status 3) the general worker drains that queue -# instead, since config.yml can turn streaming on without a restart and pulls -# queued before it went off still need a consumer. -RQ_WORKER_QUEUES=(high default low) -START_STREAMING_WORKER=true -streaming_status=0 -PYTHONPATH="/backend:${PYTHONPATH-}" python3 -c \ - 'from config.config_manager import config_manager as cm; raise SystemExit(0 if cm.get_config().STREAMING_ENABLED else 3)' || - streaming_status=$? -if [[ ${streaming_status} -eq 3 ]]; then - info_log "Streaming is disabled, the RQ worker takes the streaming queue" - START_STREAMING_WORKER=false - RQ_WORKER_QUEUES+=(streaming) -fi - # main loop while ! ((exited)); do watchdog_process_pid gunicorn @@ -441,9 +425,7 @@ while ! ((exited)); do watchdog_process_pid rq_scan_worker - if [[ ${START_STREAMING_WORKER} == "true" ]]; then - watchdog_process_pid rq_streaming_worker - fi + watchdog_process_pid rq_streaming_worker # only start the watcher if enabled if [[ ${ENABLE_RESCAN_ON_FILESYSTEM_CHANGE} == "true" ]]; then