Skip to content

Result Backend

Result backend is used to store and retrieve execution results of your tasks.

ResultBackend

set async

set(task_id: str, value: TResult) -> None

Set execution result.

get async

get(
    task_id: str,
    definition: TaskDefinition[Any, TResult],
) -> Some[TResult] | None

Immediately try to retrieve execution result of task, returns Some(result) if result was stored, None otherwise.

wait async

wait(task: RunningTask[TResult]) -> TResult

Wait on the task to finish and return the result.