prefect.server.events.models.automation_held_events
Held expect events for proactive triggers with after.
Events for one bucketing key can be evaluated in any order, so an expect event can be
evaluated before the after event that opens its window, or counted in one window
before a later after event rolls it. Every expect-only event is held here, and each
bucket that opens or rolls counts the held events that occurred inside its window.
Functions
slot_start
occurred, where slots are width wide
and aligned to the epoch
holds_expect_events
expect-only events for the buckets that open
later
acquire_bucketing_key_lock
is_held
hold_event
held_events_in_window
start (inclusive) to end (exclusive)
sweep_held_events
HELD_EXPECT_EVENTS_RETENTION
before now, unless a bucket for its key has not ended by now