Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

airflow.triggers.deadline

Attributes

log

PAYLOAD_STATUS_KEY

PAYLOAD_BODY_KEY

Classes

DeadlineCallbackTrigger

Trigger that executes a deadline callback function asynchronously.

Module Contents

airflow.triggers.deadline.log[source]
airflow.triggers.deadline.PAYLOAD_STATUS_KEY = 'state'[source]
airflow.triggers.deadline.PAYLOAD_BODY_KEY = 'body'[source]
class airflow.triggers.deadline.DeadlineCallbackTrigger(callback_path, callback_kwargs=None)[source]

Bases: airflow.triggers.base.BaseTrigger

Trigger that executes a deadline callback function asynchronously.

callback_path[source]
callback_kwargs[source]
serialize()[source]

Return the information needed to reconstruct this Trigger.

Returns:

Tuple of (class path, keyword arguments needed to re-instantiate).

Return type:

tuple[str, dict[str, Any]]

async run()[source]

Run the trigger in an asynchronous context.

The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.

If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).

In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.

Was this entry helpful?