Skip to content

Commit 1cd7bbd

Browse files
author
Andrei Neagu
committed
removed
1 parent f3ca256 commit 1cd7bbd

File tree

1 file changed

+1
-9
lines changed
  • services/storage/src/simcore_service_storage/modules

1 file changed

+1
-9
lines changed

services/storage/src/simcore_service_storage/modules/rabbitmq.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import logging
2-
from contextlib import suppress
32
from typing import cast
43

54
from 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
86
from servicelib.rabbitmq import (
97
RabbitMQClient,
108
RabbitMQRPCClient,
@@ -64,9 +62,3 @@ def get_rabbitmq_client(app: FastAPI) -> RabbitMQClient:
6462
def 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)

0 commit comments

Comments
 (0)