airflow.example_dags.example_task_state_store_async
Example DAG for an async task that checkpoints its progress with aget/aset.
The task fetches pages concurrently and records which ones finished. A staged failure part way through the first attempt shows the retry resuming from the checkpoint instead of re-fetching everything, and the Dag run still ends successfully.
Attributes
Functions
|
Fetch every page, checkpointing after each concurrent batch. |
Module Contents
- airflow.example_dags.example_task_state_store_async.log[source]
- airflow.example_dags.example_task_state_store_async.PAGES[source]
- airflow.example_dags.example_task_state_store_async.BATCH_SIZE = 4[source]
- airflow.example_dags.example_task_state_store_async.CRASH_AFTER = 6[source]
- async airflow.example_dags.example_task_state_store_async.ingest_pages(task_state_store=None, ti=None)[source]
Fetch every page, checkpointing after each concurrent batch.