orangeqs.juice.task._task#
Base class for tasks.
Module Contents#
Classes#
Base class for tasks that can be executed by a service. |
|
Future that resolves to the result of a task. |
API#
- class orangeqs.juice.task._task.Task(/, **data: Any)#
Bases:
pydantic.BaseModelBase class for tasks that can be executed by a service.
- classmethod type() str#
Return the unique name of the task type.
This is used to validate the model on the service side and route the task to the correct handler. Defaults to the class name.
Warning: The name of the type should be unique per service. Can be overridden to prevent name clashes.
Return a set of field names to exclude from the display name.
By default, this excludes the
parallelclass variable.
- class orangeqs.juice.task._task.TaskFuture(task_id: str)#
Bases:
asyncio.Future[orangeqs.juice.task._task._T]Future that resolves to the result of a task.