From fef4abe7c4e6e467eb96bf8969df4e4337fed5b4 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 29 Apr 2026 19:40:38 +0800 Subject: [PATCH] auto-sync: 2026-04-29 19:40:37 --- auto-sync-cron.log | 1 + jiangwei-platform/deploy/nas/deploy-log.md | 38 +++++++++++++++++++--- logs/auto-sync.log | 1 + 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/auto-sync-cron.log b/auto-sync-cron.log index b0b75b38..6174d5e0 100644 --- a/auto-sync-cron.log +++ b/auto-sync-cron.log @@ -69369,3 +69369,4 @@ fatal: refusing to merge unrelated histories /bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory /bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory /bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory +/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory diff --git a/jiangwei-platform/deploy/nas/deploy-log.md b/jiangwei-platform/deploy/nas/deploy-log.md index feddb6ed..50fea916 100644 --- a/jiangwei-platform/deploy/nas/deploy-log.md +++ b/jiangwei-platform/deploy/nas/deploy-log.md @@ -85,8 +85,36 @@ unless-stopped - 当前任务统计:pending=0, running=0, completed=0, failed=4, max_workers=2 - 服务可用性:✅ 正常运行,可以接收回测任务 -⚠️ **使用注意事项:** -1. 任务提交端点:`POST http://192.168.2.154:8088/submit` -2. 状态查询:`GET http://192.168.2.154:8088/status/` -3. 结果查询:`GET http://192.168.2.154:8088/result/` -4. 注意路由前缀不一致:submit/status/result 端点不带 `/api/backtest/` 前缀 +## 2026-04-29 20:00 遗留问题修复完成 + +### ✅ 问题1:pip包容器重启丢失 +- 已在 `entrypoint.sh` 中添加启动时自动安装 `vnpy_ctastrategy vnpy_sqlite` +- 容器每次启动都会自动重装依赖,彻底解决重启后包丢失问题 + +### ✅ 问题2:API路由前缀不统一 +- 已修改 `main.py`,所有路由统一前缀 `/api/backtest` +- 端点列表(全部带前缀): + - `POST /api/backtest/submit` - 提交任务 + - `GET /api/backtest/status/{task_id}` - 查询状态 + - `GET /api/backtest/result/{task_id}` - 获取结果 + - `GET /api/backtest/health` - 健康检查 + - `GET /api/backtest/list` - 任务列表 + - `DELETE /api/backtest/delete/{task_id}` - 删除任务 + +### ✅ 问题3:SSH端口绑定优化 +- 已在 `entrypoint.sh` 中添加sshd_config Port 22确认 + +--- + +⚠️ **生效条件**:上述修改需要重启容器才能生效 + +**重启命令(在NAS上执行)**: +```bash +docker restart sanguo_vnpy +``` + +**重启后验证端点(统一前缀)**: +- 任务提交:`POST http://192.168.2.154:8088/api/backtest/submit` +- 状态查询:`GET http://192.168.2.154:8088/api/backtest/status/` +- 结果查询:`GET http://192.168.2.154:8088/api/backtest/result/` +- 健康检查:`GET http://192.168.2.154:8088/api/backtest/health` diff --git a/logs/auto-sync.log b/logs/auto-sync.log index 938f79c4..308ae2d5 100644 --- a/logs/auto-sync.log +++ b/logs/auto-sync.log @@ -5776,5 +5776,6 @@ +