feat(investigations): add event impact and work-order feedback flows
Add isolated burst and pollution impact evidence, parallel work-order workflows, persisted notifications and graph updates. Checkpoint current code. Known follow-ups remain for large pollution result previews and graceful geometry failure.
This commit is contained in:
@@ -10,14 +10,14 @@ from app.domain.domain_errors import require
|
||||
|
||||
|
||||
DISPLAY_TIMEZONE = timezone(timedelta(hours=8))
|
||||
METRICS = {"pressure": "pressure", "pipe_flow": "flow", "flow": "flow"}
|
||||
METRICS = {"pressure": "pressure", "pipe_flow": "flow", "flow": "flow", "quality": "quality", "water_quality": "quality"}
|
||||
|
||||
|
||||
def applies(task: dict) -> bool:
|
||||
if task.get("workflow") != "scada_anomaly" and not task.get("source", {}).get("replay_context"):
|
||||
if task.get("workflow") not in {"scada_anomaly", "water_pollution"} and not task.get("source", {}).get("replay_context"):
|
||||
return False
|
||||
# Recovery has its own Server-verified post-repair evidence and finalization gate.
|
||||
return (task.get("handling_context") or {}).get("phase") not in {"verification_ready", "completed"}
|
||||
return (task.get("handling_context") or {}).get("phase") not in {"verification_ready", "field_review", "completed"}
|
||||
|
||||
|
||||
def cutoff(task: dict) -> datetime:
|
||||
|
||||
Reference in New Issue
Block a user