Skip to main content

prefect.server.events.models.composite_trigger_child_firing

Functions

acquire_composite_trigger_lock

Acquire a transaction-scoped advisory lock for the given composite trigger. This serializes concurrent child trigger evaluations for the same compound trigger, preventing a race condition where multiple transactions each see only their own child firing and neither fires the parent. The lock is automatically released when the transaction commits or rolls back.

upsert_child_firing

get_child_firings

clear_old_child_firings

clear_child_firings

Delete the specified child firings and return the IDs that were actually deleted. Returns the set of child_firing_ids that were successfully deleted. Callers can compare this to the expected firing_ids to detect races and avoid double-firing composite triggers.