server.web.routes.v3.fsm.tool
Routes for Tools.
Attributes
Functions
|
Add a tool to the database. |
|
Get the Tool Version. |
|
Gets resource usage and node args for all TaskInstances associated with a given tool. |
Module Contents
- async server.web.routes.v3.fsm.tool.add_tool(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]
Add a tool to the database.
- server.web.routes.v3.fsm.tool.get_tool_versions(tool_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]
Get the Tool Version.
- server.web.routes.v3.fsm.tool.get_tool_resource_usage(tool_name: str, start_date: str | None = None, end_date: str | None = None, db: sqlalchemy.orm.Session = Depends(get_db)) Any[source]
Gets resource usage and node args for all TaskInstances associated with a given tool.
We limit this to one week time spans to not overwhelm the database.
- Parameters:
- Returns:
A list of dictionaries containing TaskInstance ID, node argument value, TaskInstance maxrss, TaskInstance wallclock, and requested resources.
- Return type:
List[Dict[str, Any]]
- Example Call:
/tool/large_wf_tool/tool_resource_usage?start_date=2024-07-11&end_date=2024-07-18
- Example Response:
- [
- {
“node_arg_val”: “–provenance True”, “ti_id”: 12345677, “ti_maxrss”: 50844672, “ti_requested_resources”: {“runtime”: 21600, “memory”: 10}, “ti_wallclock”: 20
}, {
“node_arg_val”: “–intrinsic False”, “ti_id”: 12345678, “ti_maxrss”: 43960320, “ti_requested_resources”: {“runtime”: 21600, “memory”: 10}, “ti_wallclock”: 22
}
]