auto-sync: 2026-04-29 19:40:37

This commit is contained in:
cfdaily
2026-04-29 19:40:38 +08:00
parent b7bf157350
commit fef4abe7c4
3 changed files with 35 additions and 5 deletions
+1
View File
@@ -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
+33 -5
View File
@@ -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/<task_id>`
3. 结果查询:`GET http://192.168.2.154:8088/result/<task_id>`
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/<task_id>`
- 结果查询:`GET http://192.168.2.154:8088/api/backtest/result/<task_id>`
- 健康检查:`GET http://192.168.2.154:8088/api/backtest/health`
+1
View File
@@ -5776,5 +5776,6 @@