feat/58 - simplify complex logic
This commit is contained in:
@@ -174,12 +174,12 @@ class RouterConsumer(RouterProducer):
|
||||
)
|
||||
if not await self.publish_service_message(service_message, self.cm_response_exchange):
|
||||
logging_warning(
|
||||
"RouterConsumer couldn't remove current route: %s, channel not open.",
|
||||
"RouterConsumer couldn't remove current_availability route: %s, channel not open.",
|
||||
route,
|
||||
)
|
||||
|
||||
except Exception as ioe:
|
||||
logging_error("RouterConsumer failed remove current route: %s", ioe)
|
||||
logging_error("RouterConsumer failed remove current_availability route: %s", ioe)
|
||||
|
||||
result: bool = self.remove_route(route)
|
||||
return result
|
||||
|
||||
@@ -81,7 +81,7 @@ class RouterProducer(RouterBase):
|
||||
name=CM_REQUEST_EXCHANGE, type=ExchangeType.fanout
|
||||
)
|
||||
#
|
||||
# 2. declare ResponseExchange where to publish current RoutingData (response to
|
||||
# 2. declare ResponseExchange where to publish current_availability RoutingData (response to
|
||||
# a RoutingData request)
|
||||
self.cm_response_exchange = await self.channel.declare_exchange(
|
||||
name=CM_RESPONSE_EXCHANGE, type=ExchangeType.fanout
|
||||
|
||||
Reference in New Issue
Block a user