File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
services/api-server/src/simcore_service_api_server/services_rpc Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ from dataclasses import dataclass
2+ from functools import partial
3+
4+ from models_library .api_schemas_webserver .storage import PathToExport
5+ from models_library .products import ProductName
6+ from models_library .users import UserID
7+ from servicelib .rabbitmq ._client_rpc import RabbitMQRPCClient
8+ from servicelib .rabbitmq .rpc_interfaces .storage .simcore_s3 import start_export_data
9+
10+ from ..exceptions .service_errors_utils import service_exception_mapper
11+
12+ _exception_mapper = partial (service_exception_mapper , service_name = "Storage" )
13+
14+
15+ @dataclass (frozen = True , kw_only = True )
16+ class StorageService :
17+ _rpc_client : RabbitMQRPCClient
18+
19+ @_exception_mapper (rpc_exception_map = {})
20+ async def start_data_export (
21+ self ,
22+ user_id : UserID ,
23+ product_name : ProductName ,
24+ paths_to_export : list [PathToExport ],
25+ ):
26+ return await start_export_data (
27+ self ._rpc_client ,
28+ user_id = user_id ,
29+ product_name = product_name ,
30+ paths_to_export = paths_to_export ,
31+ )
You can’t perform that action at this time.
0 commit comments