Skip to main content

run_task

Function run_task 

Source
pub async fn run_task<F, S, O>(
    ctx: &RunContext<'_, F, S, O>,
    task: &TaskId,
    predecessor_streams: &BTreeMap<TaskId, PredecessorStreamHashes>,
    created_at_unix: u64,
) -> Result<CompletedRecord, RunTaskError>
Expand description

Single-task lifecycle entry point: composes cache_lookup_phase, restore_from_hit, and run_fresh without any mutex orchestration.

Treats every task as if its mutex were always compatible. Callers that need EXEC-006 condition 3 / EXEC-007 mutex semantics (i.e., the scheduler) MUST drive the three phases directly.

Fires RunObserver::on_task_started before the lookup step and RunObserver::on_task_finished after the record is in hand.

ยงErrors

Surfaces the first error encountered across the composed phases; see the docs on each underlying function for the variants reachable from each phase.