fix(orchestrator): spawn 子进程 PYTHONPATH + entrypoint 回根治孤儿
CI/CD / test (push) Successful in 8s
CI/CD / nas-deploy (push) Failing after 33s
CI/CD / nas-verify (push) Has been skipped

ProcessPoolExecutor(spawn)子进程不继承主进程 sys.path(insert 是内存修改),
import sanguo_orchestrator 失败->BrokenProcessPool->API 回测静默失败,POST 秒回
task_id 但轮询永远 404。spawn 继承 env 不继承 sys.path,故:
1. Dockerfile ENV PYTHONPATH=/app:/app/vnpy_v4.4.0(镜像层,bind mount 覆盖不了)
2. entrypoint.sh 回仓库根(git mv 自 docker/):promote --exclude /docker 致旧版
   entrypoint 在 NAS 成 git 外孤儿(340行,被 bind mount 覆盖镜像层);回根后全量
   rsync 自动推可复现(对齐 docs/deployment/nas-deploy-plan.md 预设修复)+export 兜底
3. 三 Dockerfile COPY 路径同步

反馈: 策略 session(根因诊断+探针验证)
This commit is contained in:
2026-08-01 21:33:20 +08:00
parent ca0ec016f9
commit 6d786fbf41
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ COPY vnpy_v4.4.0/vnpy/ /app/vnpy/
COPY run_web.py /app/
# 复制启动脚本
COPY docker/entrypoint.sh /app/
COPY entrypoint.sh /app/
RUN chmod +x /app/entrypoint.sh
# 暴露端口