server.web.routes.v3.fsm.workflow

Routes for Workflows.

Attributes

logger

DIALECT

Functions

_add_workflow_attributes(→ None)

bind_workflow() → Any)

Bind a workflow to the database.

get_matching_workflows_by_workflow_args() → Any)

Return any dag hashes that are assigned to workflows with identical workflow args.

_add_or_get_wf_attribute_type(→ Optional[int])

_upsert_wf_attribute(→ None)

update_workflow_attribute() → Any)

Update the attributes for a given workflow.

set_resume() → Any)

Set resume on a workflow.

workflow_is_resumable() → Any)

Check if a workflow is in a resumable state.

get_max_concurrently_running() → Any)

Return the maximum concurrency of this workflow.

update_max_running() → Any)

Update the number of tasks that can be running concurrently for a given workflow.

task_status_updates() → Any)

Returns all tasks in the database that have the specified status.

fetch_workflow_metadata() → Any)

Get metadata associated with specified Workflow ID.

get_tasks_from_workflow() → Any)

Return tasks associated with specified Workflow ID.

get_available_workflow_statuses() → Any)

Return all available workflow statuses.

update_array_max_running() → Any)

Update the number of tasks that can be running concurrently for a given Array.

task_template_dag() → Any)

Compute the shape of a Workflow's DAG by TaskTemplate.

Module Contents

server.web.routes.v3.fsm.workflow.logger[source]
server.web.routes.v3.fsm.workflow.DIALECT[source]
server.web.routes.v3.fsm.workflow._add_workflow_attributes(workflow_id: int, workflow_attributes: Dict[str, str], session: sqlalchemy.orm.Session) None[source]
async server.web.routes.v3.fsm.workflow.bind_workflow(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Bind a workflow to the database.

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

Return any dag hashes that are assigned to workflows with identical workflow args.

server.web.routes.v3.fsm.workflow._add_or_get_wf_attribute_type(name: str, session: sqlalchemy.orm.Session) int | None[source]
server.web.routes.v3.fsm.workflow._upsert_wf_attribute(workflow_id: int, name: str, value: str, session: sqlalchemy.orm.Session) None[source]
async server.web.routes.v3.fsm.workflow.update_workflow_attribute(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Update the attributes for a given workflow.

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

Set resume on a workflow.

server.web.routes.v3.fsm.workflow.workflow_is_resumable(workflow_id: int, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Check if a workflow is in a resumable state.

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

Return the maximum concurrency of this workflow.

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

Update the number of tasks that can be running concurrently for a given workflow.

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

Returns all tasks in the database that have the specified status.

Parameters:
  • workflow_id (int) – the ID of the workflow.

  • request (Request) – the request object.

  • db (Session) – the database session.

server.web.routes.v3.fsm.workflow.fetch_workflow_metadata(workflow_id: int, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Get metadata associated with specified Workflow ID.

server.web.routes.v3.fsm.workflow.get_tasks_from_workflow(workflow_id: int, max_task_id: int, chunk_size: int, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Return tasks associated with specified Workflow ID.

server.web.routes.v3.fsm.workflow.get_available_workflow_statuses(db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Return all available workflow statuses.

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

Update the number of tasks that can be running concurrently for a given Array.

async server.web.routes.v3.fsm.workflow.task_template_dag(workflow_id: str, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]

Compute the shape of a Workflow’s DAG by TaskTemplate.