File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/rpc
payments/src/simcore_service_payments/api/rest Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,13 @@ async def run_dynamic_service(
5050)
5151async def stop_dynamic_service (
5252 app : FastAPI , * , dynamic_service_stop : DynamicServiceStop
53- ) -> NodeGet | DynamicServiceGet :
53+ ) -> None :
5454 director_v2_client = DirectorV2Client .get_from_app_state (app )
5555 settings : ApplicationSettings = app .state .settings
56- response : NodeGet | DynamicServiceGet = (
57- await director_v2_client .stop_dynamic_service (
58- node_id = dynamic_service_stop .node_id ,
59- simcore_user_agent = dynamic_service_stop .simcore_user_agent ,
60- save_state = dynamic_service_stop .save_state ,
61- timeout = settings .DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT ,
62- )
56+ await director_v2_client .stop_dynamic_service (
57+ node_id = dynamic_service_stop .node_id ,
58+ simcore_user_agent = dynamic_service_stop .simcore_user_agent ,
59+ save_state = dynamic_service_stop .save_state ,
60+ timeout = settings .DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT ,
6361 )
6462 await set_request_as_stopped (app , dynamic_service_stop )
65- return response
Original file line number Diff line number Diff line change 11# mypy: disable-error-code=truthy-function
22import logging
33from collections .abc import AsyncGenerator , Callable
4- from typing import Annotated , cast
4+ from typing import Annotated
55
66from fastapi import Depends , FastAPI , Request
77from fastapi .security import OAuth2PasswordBearer
@@ -40,9 +40,7 @@ def get_settings(request: Request) -> ApplicationSettings:
4040
4141
4242def get_rut_api (request : Request ) -> ResourceUsageTrackerApi :
43- return cast (
44- ResourceUsageTrackerApi , ResourceUsageTrackerApi .get_from_app_state (request .app )
45- )
43+ return ResourceUsageTrackerApi .get_from_app_state (request .app )
4644
4745
4846def get_from_app_state (
You can’t perform that action at this time.
0 commit comments