File tree Expand file tree Collapse file tree 3 files changed +2
-40
lines changed
services/director-v2/src/simcore_service_director_v2/modules/db/repositories Expand file tree Collapse file tree 3 files changed +2
-40
lines changed Original file line number Diff line number Diff line change 1414from models_library .users import UserID
1515from models_library .utils .fastapi_encoders import jsonable_encoder
1616from pydantic import PositiveInt
17- from simcore_postgres_database .utils_comp_runs import get_latest_run_id_for_project
1817from simcore_postgres_database .utils_repos import (
1918 pass_or_acquire_connection ,
2019 transaction_context ,
@@ -351,16 +350,6 @@ async def list_for_user_and_project_all_iterations(
351350
352351 return cast (int , total_count ), items
353352
354- async def get_latest_run_id_for_project (
355- self ,
356- conn : AsyncConnection | None = None ,
357- * ,
358- project_id : ProjectID ,
359- ) -> PositiveInt :
360- return await get_latest_run_id_for_project (
361- self .db_engine , conn , project_id = f"{ project_id } "
362- )
363-
364353 async def create (
365354 self ,
366355 * ,
Original file line number Diff line number Diff line change @@ -33,29 +33,6 @@ async def batch_create(
3333 ),
3434 data ,
3535 )
36- # rows = result.fetchall()
37- # return [CompRunSnapshotTaskAtDBGet.model_validate(row) for row in rows]
38- except Exception as e :
39- logger .error (
40- "Failed to batch create comp run snapshot tasks: %s" ,
41- e ,
42- exc_info = True ,
43- )
36+ except Exception :
37+ logger .exception ("Failed to batch create comp run snapshot tasks" )
4438 raise
45-
46- # async def update_for_run_id_and_node_id(
47- # self,
48- # connection: AsyncConnection | None = None,
49- # *,
50- # run_id: PositiveInt,
51- # node_id: NodeID,
52- # data: dict,
53- # ) -> CompRunSnapshotTaskAtDBGet:
54- # row = await update_for_run_id_and_node_id(
55- # self.db_engine,
56- # conn=connection,
57- # run_id=run_id,
58- # node_id=f"{node_id}",
59- # data=data,
60- # )
61- # return CompRunSnapshotTaskAtDBGet.model_validate(row)
Original file line number Diff line number Diff line change @@ -200,8 +200,6 @@ async def upsert_tasks_from_project(
200200 # NOTE: comp_tasks DB only trigger a notification to the webserver if an UPDATE on comp_tasks.outputs or comp_tasks.state is done
201201 # NOTE: an exception to this is when a frontend service changes its output since there is no node_ports, the UPDATE must be done here.
202202
203- # NOTE: MD here I do not need to update the new db table!!! (remove this comment)
204-
205203 inserted_comp_tasks_db : list [CompTaskAtDB ] = []
206204 for comp_task_db in list_of_comp_tasks_in_project :
207205 insert_stmt = insert (comp_tasks ).values (
@@ -277,8 +275,6 @@ async def _update_task(
277275 async def mark_project_published_waiting_for_cluster_tasks_as_aborted (
278276 self , project_id : ProjectID , run_id : PositiveInt
279277 ) -> None :
280- # NOTE: MD here is creation/update of comp_tasks table
281-
282278 # block all pending tasks, so the sidecars stop taking them
283279 async with self .db_engine .begin () as conn :
284280 await conn .execute (
You can’t perform that action at this time.
0 commit comments