airflow.providers.common.ai.durable.storage¶
ObjectStorage-backed storage for the durable execution journal (Airflow < 3.3).
Attributes¶
Classes¶
Stores the durable journal in a single JSON file on ObjectStorage. |
Module Contents¶
- class airflow.providers.common.ai.durable.storage.DurableStorage(*, dag_id, task_id, run_id, map_index=-1)[source]¶
Stores the durable journal in a single JSON file on ObjectStorage.
All journal steps are stored as entries in a single JSON blob, written to
{base_path}/{cache_id}.jsonwherecache_idis a hash of the task instance’s identity (dag, task, run, map index) so distinct task instances never share a file.The file survives Airflow task retries since it lives outside the XCom system.
delete_steps()removes the steps of a run that succeeded, and the file once nothing is left in it.- Parameters:
- save_step(key, entry)[source]¶
Store one journal step and rewrite the journal file.
- Returns:
Trueif the entry was written,Falseif it could not be encoded.- Return type: