Skip to content

TaskResult

Part of Tasks in the Python API reference.

Related guidance: concepts/tasks, how-to/receive-local-tasks, how-to/dispatch-local-tasks, quickstarts/effector-handler.

Runnable examples: receive_task.py, dispatch_task.py, receive_mesh_task.py, dispatch_mesh_task.py.

from picogrid_ecn_client import TaskResult

Carry a typed or JSON-object task result and its reported status.

TaskResult(
*,
task_id: str,
status: TaskStatus,
data: ResultT | dict[str, JsonValue] | None = None,
error_message: str | None = None,
completed_at: datetime,
)

Source · models/task.py

NameTypeRequiredDefaultConstraintsDescription
task_idstryesmin_length=1, max_length=128Task correlation identifier, from 1 through 128 characters.
statusTaskStatusyesReported task result state.
dataResultT | dict[str, JsonValue] | NonenoNoneOptional typed result model or JSON object returned by the task.
error_messagestr | NonenoNonemin_length=1, max_length=1024Optional flat error detail, from 1 through 1024 characters. Values are stripped of surrounding whitespace before validation, so a blank string is rejected.
completed_atdatetimeyesTimezone-aware UTC time when the result was received locally.

Version 0.2.0 · branch main