airflow.example_dags.plugins.event_listener¶
Functions¶
|
Called when task state changes to RUNNING. |
|
Called when task state changes to SUCCESS. |
|
Called when task state changes to FAILED. |
|
This method is called when dag run state changes to SUCCESS. |
|
This method is called when dag run state changes to FAILED. |
|
This method is called when dag run state changes to RUNNING. |
Module Contents¶
- airflow.example_dags.plugins.event_listener.on_task_instance_running(previous_state, task_instance)[source]¶
Called when task state changes to RUNNING.
previous_task_state and task_instance object can be used to retrieve more information about current task_instance that is running, its dag_run, task and dag information.
- airflow.example_dags.plugins.event_listener.on_task_instance_success(previous_state, task_instance)[source]¶
Called when task state changes to SUCCESS.
previous_task_state and task_instance object can be used to retrieve more information about current task_instance that has succeeded, its dag_run, task and dag information.
A RuntimeTaskInstance is provided in most cases, except when the task’s state change is triggered through the API. In that case, the TaskInstance available on the API server will be provided instead.
- airflow.example_dags.plugins.event_listener.on_task_instance_failed(previous_state, task_instance, error)[source]¶
Called when task state changes to FAILED.
previous_task_state, task_instance object and error can be used to retrieve more information about current task_instance that has failed, its dag_run, task and dag information.
A RuntimeTaskInstance is provided in most cases, except when the task’s state change is triggered through the API. In that case, the TaskInstance available on the API server will be provided instead.
- airflow.example_dags.plugins.event_listener.on_dag_run_success(dag_run, msg)[source]¶
This method is called when dag run state changes to SUCCESS.