fix(replay): preserve failed periodic execution boundaries
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user