orangeqs.juice.task._schemas#

Schemas for task results and errors.

Module Contents#

Classes#

TaskResultOk

Result information of a successfully completed task.

TaskResultError

Result information of a task that raised an error.

Data#

TaskResult

Union of all possible task results. Either TaskResultOk or TaskResultError.

API#

class orangeqs.juice.task._schemas.TaskResultOk(/, **data: Any)#

Bases: pydantic.BaseModel

Result information of a successfully completed task.

status: Literal[ok]#

‘ok’

id: str#

None

The unique identifier of the task.

result: Any#

None

The result of the task execution.

class orangeqs.juice.task._schemas.TaskResultError(/, **data: Any)#

Bases: pydantic.BaseModel

Result information of a task that raised an error.

status: Literal[error]#

‘error’

id: str#

None

The unique identifier of the task.

ename: str#

None

The name of the error type.

evalue: str#

None

The error message.

traceback: str#

None

The traceback of the error.

orangeqs.juice.task._schemas.TaskResult#

None

Union of all possible task results. Either TaskResultOk or TaskResultError.

exception orangeqs.juice.task._schemas.TaskExecutionError(error: orangeqs.juice.task._schemas.TaskResultError)#

Bases: Exception

Task execution error, raised if a task fails.

Raised by request() and execute() when a task fails with check=True

error: orangeqs.juice.task._schemas.TaskResultError#

None

The wrapped error details.

property traceback: str#

The traceback of the error.