server.web.routes.v3.fsm.task

Routes for Tasks.

Attributes

logger

DIALECT

Functions

bind_tasks_no_args() → Any)

Bind the task objects to the database.

bind_task_args() → Any)

Add task args and associated task ids to the database.

bind_task_attributes() → Any)

Add task attributes and associated attribute types to the database.

_add_or_get_attribute_types(→ Dict[str, int])

bind_task_resources() → Any)

Add the task resources for a given task.

get_most_recent_ti_error() → Any)

Route to determine the cause of the most recent task_instance's error.

set_task_resume_state() → Any)

An endpoint to set all tasks to a resumable state for a workflow.

Module Contents

server.web.routes.v3.fsm.task.logger[source]
server.web.routes.v3.fsm.task.DIALECT[source]
async server.web.routes.v3.fsm.task.bind_tasks_no_args(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Bind the task objects to the database.

async server.web.routes.v3.fsm.task.bind_task_args(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Add task args and associated task ids to the database.

async server.web.routes.v3.fsm.task.bind_task_attributes(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Add task attributes and associated attribute types to the database.

server.web.routes.v3.fsm.task._add_or_get_attribute_types(names: List[str] | Set[str], db: sqlalchemy.orm.Session) Dict[str, int][source]
async server.web.routes.v3.fsm.task.bind_task_resources(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Add the task resources for a given task.

server.web.routes.v3.fsm.task.get_most_recent_ti_error(task_id: int, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Route to determine the cause of the most recent task_instance’s error.

Parameters:
  • task_id (int) – the ID of the task.

  • db – The database session.

Returns:

error message

async server.web.routes.v3.fsm.task.set_task_resume_state(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

An endpoint to set all tasks to a resumable state for a workflow.

Conditioned on the workflow already being in an appropriate resume state.