server.web.repositories.workflow_repository
Attributes
Classes
Initialize the workflow repository. |
Module Contents
- server.web.repositories.workflow_repository.logger
- class server.web.repositories.workflow_repository.WorkflowRepository(session: sqlalchemy.orm.Session)
Initialize the workflow repository.
- session
- get_workflow_validation_status(task_ids: List[int]) jobmon.server.web.schemas.workflow.WorkflowValidationResponse
Check if workflow is valid.
- get_workflow_tasks(workflow_id: int, limit: int, status: List[str] | None = None) jobmon.server.web.schemas.workflow.WorkflowTasksResponse
Get the tasks for a given workflow.
- get_workflow_requested_resources(workflow_id: int) jobmon.server.web.schemas.workflow.WorkflowRequestedResourcesResponse
Return one cluster per unique
(task_template, task_resources_id).Sourced from
Task.task_resources_idso the panel works pre-launch. The Task Template Details task table (TI-indexed) uses/task_resources/batchfor its lookup instead.
- get_workflow_user_validation(workflow_id: int, username: str) jobmon.server.web.schemas.workflow.WorkflowUserValidationResponse
Return all usernames associated with a given workflow_id’s workflow runs.
- get_workflow_run_for_reset(workflow_id: int, username: str) jobmon.server.web.schemas.workflow.WorkflowRunForResetResponse
Get last workflow_run_id for workflow reset validation.
- reset_workflow(workflow_id: int, partial_reset: bool = False) None
Update the workflow’s status, all its tasks’ statuses to ‘G’.
- get_workflow_status(workflow_id: int | str | List[int | str] | None = None, limit: int | None = None, user: List[str] | None = None) jobmon.server.web.schemas.workflow.WorkflowStatusResponse
Get the status of the workflow.
- get_workflow_status_viz(workflow_ids: List[int]) Dict[int, Any]
Get the status of the workflows for GUI.
- get_workflow_overview(f: jobmon.server.web.schemas.workflow.WorkflowOverviewFilters | None = None) jobmon.server.web.schemas.workflow.WorkflowOverviewResponse
Fetch workflow overview filtered by the given criteria.
The query is structured as three layers: 1. Inner subquery: find workflow IDs matching filters. 2. Middle subquery: find distinct (queue, workflow)
pairs via task → task_resources.
Outer query: join back to workflow for final SELECT / GROUP BY / ORDER BY.