File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
services/web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 11import logging
22
33import sqlalchemy as sa
4-
54from aiohttp import web
65from models_library .projects import ProjectID
76from models_library .projects_nodes import Node , PartialNode
109from simcore_postgres_database .webserver_models import projects_nodes
1110from sqlalchemy .ext .asyncio import AsyncConnection
1211
13- from .exceptions import NodeNotFoundError
1412from ..db .plugin import get_asyncpg_engine
13+ from .exceptions import NodeNotFoundError
1514
1615_logger = logging .getLogger (__name__ )
1716
3635]
3736
3837
39- async def get (
38+ async def get_node (
4039 app : web .Application ,
4140 connection : AsyncConnection | None = None ,
4241 * ,
4342 project_id : ProjectID ,
4443 node_id : NodeID ,
4544) -> Node :
4645 async with transaction_context (get_asyncpg_engine (app ), connection ) as conn :
47- get_stmt = sa .select (
48- * _SELECTION_PROJECTS_NODES_DB_ARGS
49- ).where (
46+ get_stmt = sa .select (* _SELECTION_PROJECTS_NODES_DB_ARGS ).where (
5047 (projects_nodes .c .project_uuid == f"{ project_id } " )
5148 & (projects_nodes .c .node_id == f"{ node_id } " )
5249 )
@@ -57,14 +54,13 @@ async def get(
5754 row = await result .first ()
5855 if row is None :
5956 raise NodeNotFoundError (
60- project_uuid = f"{ project_id } " ,
61- node_uuid = f"{ node_id } "
57+ project_uuid = f"{ project_id } " , node_uuid = f"{ node_id } "
6258 )
6359 assert row # nosec
6460 return Node .model_validate (row , from_attributes = True )
6561
6662
67- async def update (
63+ async def update_node (
6864 app : web .Application ,
6965 connection : AsyncConnection | None = None ,
7066 * ,
Original file line number Diff line number Diff line change @@ -985,7 +985,7 @@ async def update_project_node_state(
985985 new_node_data = {"state" : {"currentStatus" : new_state }},
986986 )
987987
988- await _projects_nodes_repository .update (
988+ await _projects_nodes_repository .update_node (
989989 app ,
990990 project_id = project_id ,
991991 node_id = node_id ,
@@ -1057,7 +1057,7 @@ async def patch_project_node(
10571057 new_node_data = _node_patch_exclude_unset ,
10581058 )
10591059
1060- await _projects_nodes_repository .update (
1060+ await _projects_nodes_repository .update_node (
10611061 app ,
10621062 project_id = project_id ,
10631063 node_id = node_id ,
@@ -1125,7 +1125,7 @@ async def update_project_node_outputs(
11251125 new_node_data = {"outputs" : new_outputs , "runHash" : new_run_hash },
11261126 )
11271127
1128- await _projects_nodes_repository .update (
1128+ await _projects_nodes_repository .update_node (
11291129 app ,
11301130 project_id = project_id ,
11311131 node_id = node_id ,
You can’t perform that action at this time.
0 commit comments