corvix.notifications.dedupe¶
Idempotency / deduplication helpers for notification delivery.
Functions¶
|
Filter events to those not already in seen. |
|
Build an initial |
Module Contents¶
- corvix.notifications.dedupe.dedupe_events(events: list[corvix.notifications.models.NotificationEvent], seen: set[str]) tuple[list[corvix.notifications.models.NotificationEvent], set[str]][source][source]¶
Filter events to those not already in seen.
Returns a tuple of (fresh_events, updated_seen_set). The returned set is a new object; the caller should replace their reference so the state advances correctly across poll cycles.
Parameters¶
- events:
Candidate events from the current poll cycle.
- seen:
Set of
event_idvalues already delivered in previous cycles.