airflow.triggers.external_task
¶
Module Contents¶
Classes¶
Waits asynchronously for a task in a different DAG to complete for a |
|
Waits asynchronously for a DAG to complete for a specific logical date. |
- class airflow.triggers.external_task.TaskStateTrigger(dag_id, task_id, states, execution_dates, poll_interval=5.0)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Waits asynchronously for a task in a different DAG to complete for a specific logical date.
- Parameters
dag_id (str) – The dag_id that contains the task you want to wait for
task_id (str) – The task_id that contains the task you want to wait for. If
None
(default value) the sensor waits for the DAGexecution_dates (list[datetime.datetime]) –
poll_interval (float) – The time interval in seconds to check the state. The default value is 5 sec.
- class airflow.triggers.external_task.DagStateTrigger(dag_id, states, execution_dates, poll_interval=5.0)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Waits asynchronously for a DAG to complete for a specific logical date.
- Parameters
dag_id (str) – The dag_id that contains the task you want to wait for
execution_dates (list[datetime.datetime]) – The logical date at which DAG run.
poll_interval (float) – The time interval in seconds to check the state. The default value is 5.0 sec.