server.web.routes.v3.cli.workflow
Routes for Workflow.
Attributes
Functions
Check if workflow is valid. |
|
|
Check if all downstream tasks are in valid states (G, I, Q). |
|
Get the tasks for a given workflow. |
Return all usernames associated with a given workflow_id's workflow runs. |
|
Last workflow_run_id associated with a given workflow_id started by the username. |
|
|
Update the workflow's status, all its tasks' statuses to 'G'. |
|
Get the status of the workflow. |
|
Get the status of the workflows for GUI. |
|
Fetch associated workflows and workflow runs by username. |
Fetch Task details associated with Workflow ID and TaskTemplate name. |
|
|
Fetch name, args, dates, tool for a Workflow provided WF ID. |
Module Contents
- async server.web.routes.v3.cli.workflow.get_workflow_validation_status(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowValidationResponse[source]
Check if workflow is valid.
- server.web.routes.v3.cli.workflow._check_downstream_tasks_status(session: sqlalchemy.orm.Session, task_ids: List[int], workflow_id: int, dag_id: int) bool[source]
Check if all downstream tasks are in valid states (G, I, Q).
- Parameters:
session – Database session
task_ids – List of task IDs to check downstream tasks for
workflow_id – Workflow ID
dag_id – DAG ID
- Returns:
True if all downstream tasks are in valid states, False otherwise
- server.web.routes.v3.cli.workflow.get_workflow_tasks(workflow_id: int, limit: int, status: List[str] | None = Query(None), db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowTasksResponse[source]
Get the tasks for a given workflow.
- server.web.routes.v3.cli.workflow.get_workflow_user_validation(workflow_id: int, username: str, db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowUserValidationResponse[source]
Return all usernames associated with a given workflow_id’s workflow runs.
Used to validate permissions for a self-service request.
- server.web.routes.v3.cli.workflow.get_workflow_run_for_workflow_reset(workflow_id: int, username: str, db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowRunForResetResponse[source]
Last workflow_run_id associated with a given workflow_id started by the username.
- Used to validate for workflow_reset:
The last workflow_run of the current workflow must be in error state.
This last workflow_run must have been started by the input username.
This last workflow_run is in status ‘E’
- async server.web.routes.v3.cli.workflow.reset_workflow(workflow_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) starlette.responses.JSONResponse[source]
Update the workflow’s status, all its tasks’ statuses to ‘G’.
- server.web.routes.v3.cli.workflow.get_workflow_status(workflow_id: int | str | List[int | str] | None = Query(None), limit: int | None = Query(None), user: List[str] | None = Query(None), db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowStatusResponse[source]
Get the status of the workflow.
- server.web.routes.v3.cli.workflow.get_workflow_status_viz(workflow_ids: List[int] = Query(None), db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]
Get the status of the workflows for GUI.
- server.web.routes.v3.cli.workflow.workflows_by_user_form(user: str | None = Query(None), tool: str | None = Query(None), wf_name: str | None = Query(None), wf_args: str | None = Query(None), wf_attribute_value: str | None = Query(None), wf_attribute_key: str | None = Query(None), wf_id: str | None = Query(None), date_submitted: str | None = Query(None), date_submitted_end: str | None = Query(None), status: str | None = Query(None), db: sqlalchemy.orm.Session = Depends(get_db)) jobmon.server.web.schemas.workflow.WorkflowOverviewResponse[source]
Fetch associated workflows and workflow runs by username.