Updates to intel and correlation
This commit is contained in:
@@ -46,7 +46,10 @@ async def _run_sweep_pass() -> None:
|
||||
("status", "==", "ended"),
|
||||
("ended_at", ">=", cutoff),
|
||||
])
|
||||
orphans = [c for c in recent_ended if not c.get("incident_id")]
|
||||
orphans = [
|
||||
c for c in recent_ended
|
||||
if not c.get("incident_ids") and not c.get("incident_id")
|
||||
]
|
||||
|
||||
if not orphans:
|
||||
return
|
||||
@@ -89,6 +92,7 @@ async def _recorrelate_orphan(call: dict) -> bool:
|
||||
)
|
||||
|
||||
if incident_id:
|
||||
await fstore.doc_set("calls", call_id, {"incident_ids": [incident_id]})
|
||||
logger.info(
|
||||
f"Re-correlation: linked orphaned call {call_id} → incident {incident_id}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user