|
@@ -163,6 +163,12 @@ def sanitize_cluster_payload(cluster: dict[str, Any], *, include_resolutions: bo
|
|
|
if not out.get("timestamp"):
|
|
if not out.get("timestamp"):
|
|
|
out["timestamp"] = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S+00:00")
|
|
out["timestamp"] = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S+00:00")
|
|
|
|
|
|
|
|
|
|
+ # Preserve enrichment metadata across sanitization so the
|
|
|
|
|
+ # poller's enriched_at cache check works on DB round-trips.
|
|
|
|
|
+ for _fld in ("enriched_at", "enrichment_failed_at", "enrichment_retry_count"):
|
|
|
|
|
+ if _fld in cluster:
|
|
|
|
|
+ out.setdefault(_fld, cluster[_fld])
|
|
|
|
|
+
|
|
|
if not include_resolutions:
|
|
if not include_resolutions:
|
|
|
return out
|
|
return out
|
|
|
|
|
|