Files

37 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

# 推送页重构 Batch 3
**日期**: 2026-06-02
## 变更摘要
- 推送历史支持按状态、同步模式、服务器筛选(对接已有 `/api/servers/logs` 查询参数)。
- 新增 `POST /api/sync/reconcile-stale-logs`,将超时仍为 `running` 的历史记录订正为 `failed`
- 上传 ZIP 后禁用「推送源路径」输入,避免与 `effectiveSourcePath()` 逻辑不一致。
## 动机
B0 修复后仍有历史脏数据;运营需要筛选失败记录并一键清理卡住的 `running` 行。
## 涉及文件
- `server/infrastructure/database/sync_log_repo.py`
- `server/api/sync_v2.py`
- `server/api/schemas.py`
- `frontend/src/pages/PushPage.vue`
## 迁移 / 重启
- 需重启 `nexus` 后端。
- 前端需重新构建部署。
## 验证方式
```bash
ruff check server/infrastructure/database/sync_log_repo.py server/api/sync_v2.py server/api/schemas.py
cd frontend && npm run build-only
```
- 推送历史:切换状态/模式/服务器筛选,表格应刷新。
- 点击「修复卡住记录」:返回订正条数,原 `running` 行变为失败并带说明文案。
- 上传 ZIP 后源路径输入框为禁用状态。