orangeqs.juice.task_manager.tasks#
Task definitions for the Task Manager service.
Module Contents#
Classes#
Get the list of pub/sub topics seen by the task manager. |
|
Ask the task manager to schedule a ScheduledTask wrapping an inner Task. |
|
Ask the task manager to cancel a ScheduledTask. |
|
Reserve the serial slot of a service for a proxy kernel cell. |
|
Tell the Task Manager that the proxy kernel of a held slot still runs. |
|
Release a slot that |
|
Query a snapshot of a single ScheduledTask by id. |
|
Query a snapshot of every ScheduledTask the task manager holds. |
|
A read-only view of a ScheduledTask. |
API#
- class orangeqs.juice.task_manager.tasks.GetEventTopicList(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskGet the list of pub/sub topics seen by the task manager.
Returns a mapping of each unique topic to the timestamp it was last seen.
- class orangeqs.juice.task_manager.tasks.ScheduleTask(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskAsk the task manager to schedule a ScheduledTask wrapping an inner Task.
- task_metadata: dict[str, Any]#
None
The inner Task’s metadata (
parallel/display_name/show_in_dashboard).
- run_at: datetime.datetime | None#
None
Earliest time the ScheduledTask should fire;
Nonemeans as soon as eligible.
- to_scheduled_task(scheduled_task_id: str, submitted_at: datetime.datetime | None = None) orangeqs.juice.task_manager._scheduler.ScheduledTask#
Build the :class:
ScheduledTaskthis request describes.
- class orangeqs.juice.task_manager.tasks.CancelScheduledTask(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskAsk the task manager to cancel a ScheduledTask.
- class orangeqs.juice.task_manager.tasks.ReserveServiceSlot(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskReserve the serial slot of a service for a proxy kernel cell.
The task completes when the slot is held, or when the reservation is released before it got the slot. The result is
Trueif the slot is held. Release the slot withReleaseServiceSlot.
- class orangeqs.juice.task_manager.tasks.RenewServiceSlot(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskTell the Task Manager that the proxy kernel of a held slot still runs.
The proxy kernel sends this at regular intervals while a cell runs, and when the next cell runs with the same reservation (for example with Run All). The watchdog of the Task Manager does not release a slot while its proxy renews it. The result is
Falseif the slot is not held.
- class orangeqs.juice.task_manager.tasks.ReleaseServiceSlot(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskRelease a slot that
ReserveServiceSlotreserved.If the reservation still waits for the slot, this cancels it. The result is
Falseif the reservation is not known.
- class orangeqs.juice.task_manager.tasks.GetScheduledTask(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskQuery a snapshot of a single ScheduledTask by id.
- class orangeqs.juice.task_manager.tasks.GetScheduledTasks(/, **data: Any)#
Bases:
orangeqs.juice.task.TaskQuery a snapshot of every ScheduledTask the task manager holds.
- class orangeqs.juice.task_manager.tasks.ScheduledTaskSnapshot(/, **data: Any)#
Bases:
pydantic.BaseModelA read-only view of a ScheduledTask.
- run_at: datetime.datetime | None#
None
- submitted_at: datetime.datetime#
None
- submitted_by: str | None#
None
Identity of the user or service that submitted the ScheduledTask, if known.
- classmethod of(scheduled_task: orangeqs.juice.task_manager._scheduler.ScheduledTask, now: datetime.datetime | None = None, *, slot_busy: bool = False) orangeqs.juice.task_manager.tasks.ScheduledTaskSnapshot#
Build a snapshot of
scheduled_taskas seen atnow.