File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
services/storage/src/simcore_service_storage/modules Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 11import logging
2- from contextlib import suppress
32from typing import cast
43
54from fastapi import FastAPI
6- from models_library .rabbitmq_messages import RabbitMessageBase
7- from servicelib .logging_utils import log_catch , log_context
5+ from servicelib .logging_utils import log_context
86from servicelib .rabbitmq import (
97 RabbitMQClient ,
108 RabbitMQRPCClient ,
@@ -64,9 +62,3 @@ def get_rabbitmq_client(app: FastAPI) -> RabbitMQClient:
6462def get_rabbitmq_rpc_server (app : FastAPI ) -> RabbitMQRPCClient :
6563 assert app .state .rabbitmq_rpc_server # nosec
6664 return cast (RabbitMQRPCClient , app .state .rabbitmq_rpc_server )
67-
68-
69- async def post_message (app : FastAPI , message : RabbitMessageBase ) -> None :
70- with log_catch (_logger , reraise = False ), suppress (ConfigurationError ):
71- # NOTE: if rabbitmq was not initialized the error does not need to flood the logs
72- await get_rabbitmq_client (app ).publish (message .channel_name , message )
You can’t perform that action at this time.
0 commit comments