fix(entrypoint): uvicorn --log-level 转小写(治 exit2 crash loop,第3根因)
CI/CD / test (push) Successful in 9s
CI/CD / nas-deploy (push) Successful in 22s
CI/CD / nas-verify (push) Successful in 2s

新版 entrypoint(uvicorn 工厂)拼 --log-level ${VNPY_LOG_LEVEL:-info},但 VNPY_LOG_LEVEL
已 export INFO 大写,默认值不生效→传 INFO→uvicorn case-sensitive 拒绝→exit2 crash。
改 ${VNPY_LOG_LEVEL,,} 转小写(bash4+,shebang /bin/bash 支持)。

新版 entrypoint uvicorn 工厂首次在 NAS 跑,连暴露 3 个 crash 根因(已全修):
  6d786fb: PYTHONPATH(spawn import 治 BrokenProcessPool)
  c210197: +x 执行位(tini exit126) + SKIP_REDIS_CHECK(Redis 超时)
  本commit: --log-level 小写(uvicorn exit2)
旧版 python run_web.py 硬编码 log_level='info' 无后两个问题。
This commit is contained in:
2026-08-01 21:59:39 +08:00
parent c210197778
commit 0f6cdbedc9
+1 -1
View File
@@ -270,7 +270,7 @@ start_web_service() {
log_info "使用单 Worker 模式(sanguo_api 状态化 orchestrator"
# 日志级别
UVICORN_ARGS="$UVICORN_ARGS --log-level ${VNPY_LOG_LEVEL:-info}"
UVICORN_ARGS="$UVICORN_ARGS --log-level ${VNPY_LOG_LEVEL,,}"
# 访问日志
UVICORN_ARGS="$UVICORN_ARGS --access-log"