fix(config): ARQ_EMBEDDED_WORKER 改为 env 权威——DB 种子值不得拉起 API 内嵌 worker - #509
Merged
Merged
Conversation
worker 拆分部署(k8s/compose 设 env=false + 独立 worker Deployment)实测失效: settings 加载顺序是 DB > env,system_settings 里的历史种子值(system:init 写入 true)覆盖 env,API 内嵌 worker 照常启动、与独立 worker 双消费同一队列。 归入 RESTART_REQUIRED_SETTINGS(连接类白名单)——该开关是部署拓扑决策, 本就该由 env/compose 唯一决定;运行时面板修改语义不变。
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ARQ_EMBEDDED_WORKER加入RESTART_REQUIRED_SETTINGS(env-authoritative 白名单)。worker 拆分部署(#507)实测失效:settings 加载顺序是 DB > env,system_settings的历史种子值(system:init写入true)覆盖了 k8s/compose 里的env=false,API 内嵌 worker 照常启动,与独立 worker Deployment 双消费同一 arq 队列。问题复现(2026-09-09 staging)
ARQ_EMBEDDED_WORKER=false+lambchat-staging-workerDeployment)Embedded arq worker started,提交对话任务后被 API pod 消费执行(worker pod 空转)false、system_settings里存在种子行value: true→ DB 覆盖 envFix
refresh_settings)语义不变init_from_env会把 env 值种进 DB,UI 展示与实际一致Testing
test_arq_embedded_worker_is_env_authoritative(DB=true + env=false → 保持 false),修复前失败、修复后通过tests/kernel/config/65 passed;tests/infra/task/+tests/infra/settings/311 passed