server.web.routes.v2.fsm.workflow
Routes for Workflows.
Attributes
Functions
|
|
|
Bind a workflow to the database. |
Return any dag hashes that are assigned to workflows with identical workflow args. |
|
|
|
|
|
|
Update the attributes for a given workflow. |
|
Set resume on a workflow. |
|
Check if a workflow is in a resumable state. |
|
Return the maximum concurrency of this workflow. |
|
Update the number of tasks that can be running concurrently for a given workflow. |
|
Returns all tasks in the database that have the specified status. |
|
Get metadata associated with specified Workflow ID. |
|
Return tasks associated with specified Workflow ID. |
|
Gets task instance resource usage for a given Workflow ID. |
Module Contents
- server.web.routes.v2.fsm.workflow._add_workflow_attributes(workflow_id: int, workflow_attributes: Dict[str, str], session: sqlalchemy.orm.Session) None[source]
- server.web.routes.v2.fsm.workflow.get_matching_workflows_by_workflow_args(workflow_args_hash: str) Any[source]
Return any dag hashes that are assigned to workflows with identical workflow args.
- server.web.routes.v2.fsm.workflow._add_or_get_wf_attribute_type(name: str, session: sqlalchemy.orm.Session) int | None[source]
- server.web.routes.v2.fsm.workflow._upsert_wf_attribute(workflow_id: int, name: str, value: str, session: sqlalchemy.orm.Session) None[source]
- server.web.routes.v2.fsm.workflow.update_workflow_attribute(workflow_id: int) Any[source]
Update the attributes for a given workflow.
- server.web.routes.v2.fsm.workflow.set_resume(workflow_id: int) Any[source]
Set resume on a workflow.
- server.web.routes.v2.fsm.workflow.workflow_is_resumable(workflow_id: int) Any[source]
Check if a workflow is in a resumable state.
- server.web.routes.v2.fsm.workflow.get_max_concurrently_running(workflow_id: int) Any[source]
Return the maximum concurrency of this workflow.
- server.web.routes.v2.fsm.workflow.update_max_running(workflow_id: int) Any[source]
Update the number of tasks that can be running concurrently for a given workflow.
- server.web.routes.v2.fsm.workflow.task_status_updates(workflow_id: int) Any[source]
Returns all tasks in the database that have the specified status.
- Parameters:
workflow_id (int) – the ID of the workflow.
- server.web.routes.v2.fsm.workflow.fetch_workflow_metadata(workflow_id: int) Any[source]
Get metadata associated with specified Workflow ID.
- server.web.routes.v2.fsm.workflow.get_tasks_from_workflow(workflow_id: int) Any[source]
Return tasks associated with specified Workflow ID.
- server.web.routes.v2.fsm.workflow.get_wf_resource_usage(workflow_id: int) Any[source]
Gets task instance resource usage for a given Workflow ID.
- Parameters:
workflow_id (int) – ID of the Workflow
- Returns:
A list of dictionaries containing the Task ID, name, status and num of attempts and the TaskInstance ID, status and resource usage.
- Return type:
List[Dict[str, Any]]
- Example Call:
/workflow/123412/wf_resource_usage
- Example Response:
- [
- {
“task_id”: 6213741, “task_name”: “random_task_name”, “task_status”: “D”, “task_num_attempts”: 2, “task_instance_id”: 91823412, “ti_usage_str”: “wallclock=8 cpu=1, mem=7 GBs, io=5 GB” “ti_wallclock”: 8 “ti_maxrss”: 7 “ti_maxpss”: 5 “ti_cpu”: 1 “ti_io”: 5 “ti_status”: “D”
}
]