Skip to content

interventions

etl_craft.engine.repository.interventions

What operators changed in runs, in AUD_RUN_INTERVENTIONS, and the changes themselves.

Intervention dataclass

One change to a run: what, from what to what, who, when and why.

task_code is None for a change to the run itself; to_status is None for a task reset to run again.

TaskRow dataclass

A task's row under a run, whether an operator marked it, and who consumed it, if anyone.

record_intervention

record_intervention(conn: Connection, *, pipeline_id: int, pipeline_run_id: int, action: InterventionAction, reason: str, requested_by: str, task_id: int | None = None, from_status: str | None = None, to_status: str | None = None, target_count: int | None = None, previous_message: str | None = None) -> None

Record one change an operator made to a run, or to a task under it.

fetch_task_rows

fetch_task_rows(conn: Connection, pipeline_run_id: int) -> list[TaskRow]

Return every task row under pipeline_run_id, by task code.

fetch_interventions

fetch_interventions(conn: Connection, pipeline_id: int, first_run_id: int) -> list[Intervention]

Return the changes to the runs of pipeline_id from first_run_id on, oldest first.