fix(replay): preserve failed periodic execution boundaries
Generic Container CI/CD / test-build-publish (push) Successful in 4m23s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 4m23s

This commit is contained in:
2026-11-16 16:21:58 +08:00
parent 389892cb3f
commit 9cd1400723
5 changed files with 119 additions and 11 deletions
+2
View File
@@ -140,6 +140,8 @@ class ScadaReplayService:
document = await project_periodic_state(self.repo, document)
if snapshot(document).periodic_pending:
raise HTTPException(409, "本周期水力计算尚未完成,请等待后继续播放")
if (document.get("last_scheduled_simulation") or {}).get("status") == "failed":
raise HTTPException(409, "本周期水力计算未完成,请在工况任务中重试,或停止后重新开始本轮")
action, status = command.action, document["status"]
if (action in {"step", "monitor", "retry"} and document.get("warmed")
and weighted_diagnosis(document)