server.web.routes.v3.fsm.workflow ================================= .. py:module:: server.web.routes.v3.fsm.workflow .. autoapi-nested-parse:: Routes for Workflows. Attributes ---------- .. autoapisummary:: server.web.routes.v3.fsm.workflow.logger server.web.routes.v3.fsm.workflow.DIALECT Functions --------- .. autoapisummary:: server.web.routes.v3.fsm.workflow._add_workflow_attributes server.web.routes.v3.fsm.workflow.bind_workflow server.web.routes.v3.fsm.workflow.get_matching_workflows_by_workflow_args server.web.routes.v3.fsm.workflow._add_or_get_wf_attribute_type server.web.routes.v3.fsm.workflow._upsert_wf_attribute server.web.routes.v3.fsm.workflow.update_workflow_attribute server.web.routes.v3.fsm.workflow.set_resume server.web.routes.v3.fsm.workflow.workflow_is_resumable server.web.routes.v3.fsm.workflow.get_max_concurrently_running server.web.routes.v3.fsm.workflow.update_max_running server.web.routes.v3.fsm.workflow.task_status_updates server.web.routes.v3.fsm.workflow.fetch_workflow_metadata server.web.routes.v3.fsm.workflow.get_tasks_from_workflow server.web.routes.v3.fsm.workflow.get_available_workflow_statuses server.web.routes.v3.fsm.workflow.update_array_max_running server.web.routes.v3.fsm.workflow.task_template_dag Module Contents --------------- .. py:data:: logger .. py:data:: DIALECT .. py:function:: _add_workflow_attributes(workflow_id: int, workflow_attributes: Dict[str, str], session: sqlalchemy.orm.Session) -> None .. py:function:: bind_workflow(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Bind a workflow to the database. .. py:function:: get_matching_workflows_by_workflow_args(workflow_args_hash: str, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Return any dag hashes that are assigned to workflows with identical workflow args. .. py:function:: _add_or_get_wf_attribute_type(name: str, session: sqlalchemy.orm.Session) -> Optional[int] .. py:function:: _upsert_wf_attribute(workflow_id: int, name: str, value: str, session: sqlalchemy.orm.Session) -> None .. py:function:: update_workflow_attribute(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Update the attributes for a given workflow. .. py:function:: set_resume(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Set resume on a workflow. .. py:function:: workflow_is_resumable(workflow_id: int, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any Check if a workflow is in a resumable state. .. py:function:: get_max_concurrently_running(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Return the maximum concurrency of this workflow. .. py:function:: update_max_running(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Update the number of tasks that can be running concurrently for a given workflow. .. py:function:: task_status_updates(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Returns all tasks in the database that have the specified status. :param workflow_id: the ID of the workflow. :type workflow_id: int :param request: the request object. :type request: Request :param db: the database session. :type db: Session .. py:function:: fetch_workflow_metadata(workflow_id: int, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any Get metadata associated with specified Workflow ID. .. py:function:: get_tasks_from_workflow(workflow_id: int, max_task_id: int, chunk_size: int, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any Return tasks associated with specified Workflow ID. .. py:function:: get_available_workflow_statuses(db: sqlalchemy.orm.Session = Depends(get_db)) -> Any Return all available workflow statuses. .. py:function:: update_array_max_running(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Update the number of tasks that can be running concurrently for a given Array. .. py:function:: task_template_dag(workflow_id: str, db: sqlalchemy.orm.Session = Depends(get_db)) -> Any :async: Compute the shape of a Workflow's DAG by TaskTemplate.