Skip to content

tasks

etl_craft.services.operations.tasks

Task execution and intervention operations under exact run selectors.

run_task

run_task(ctx: OperationContext, pipeline_code: str, task_code: str, *, selector: RunSelector = ACTIVE_RUN, run_date: date | None = None, reason: str | None = None) -> OperationResult

Run one task; a reason requests the recorded dependency override.

force_task

force_task(ctx: OperationContext, pipeline_code: str, task_code: str, *, selector: RunSelector = ACTIVE_RUN, run_date: date | None = None) -> OperationResult

Force one task and settle a reopened pipeline as the execution layer requires.

rerun_task

rerun_task(ctx: OperationContext, pipeline_code: str, task_code: str, reason: str, *, with_downstream: bool = False, selector: RunSelector = ACTIVE_RUN, run_date: date | None = None) -> OperationResult

Rerun one task and optionally its downstream tasks, preserving attempt history.

mark_task

mark_task(ctx: OperationContext, pipeline_code: str, task_code: str, status: str, reason: str, *, rows: int | None = None, stale: bool = False, selector: RunSelector = ACTIVE_RUN) -> OperationResult

Mark one task, reconciling expired attempts first only when stale is requested.