airflow.example_dags.example_task_state

Example Dag that demonstrates the canonical AIP-103 task state pattern: a task submits a long-running external job, stores the job handle in task state, and polls until completion.

The first attempt always fails after submitting the job (simulating a worker crash / connection to external system being lost). The retry reads the job ID from task state and reattaches to the already-running job instead of submitting a duplicate.

Functions

run_job(**context)

Module Contents

airflow.example_dags.example_task_state.run_job(**context)[source]

Was this entry helpful?