feat/#58 - fix unit test and deployment pipeline
This commit is contained in:
@@ -22,7 +22,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: general
|
||||
services:
|
||||
dind:
|
||||
image: docker:dind
|
||||
|
||||
@@ -10,6 +10,7 @@ from aio_pika.abc import AbstractIncomingMessage, AbstractRobustExchange
|
||||
from opentelemetry import trace
|
||||
from opentelemetry.trace import Tracer, TraceState
|
||||
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
|
||||
from pika.exchange_type import ExchangeType
|
||||
|
||||
from amqp.adapter.backpressure_handler import BackpressureHandler
|
||||
from amqp.adapter.cleverthis_service_adapter import AMQMessage, CleverThisServiceAdapter
|
||||
@@ -312,20 +313,18 @@ class DataMessageHandler:
|
||||
)
|
||||
|
||||
# Get the exchange from the route
|
||||
exchange_name = route.exchange
|
||||
exchange = await self.rabbit_mq_client.connection.get_exchange(exchange_name)
|
||||
|
||||
# Publish the message to the exchange with the component name as the routing key
|
||||
await exchange.publish(
|
||||
message=pika_message,
|
||||
routing_key=route.component_name
|
||||
rpc_exchange_name = route.exchange
|
||||
exchange: AbstractRobustExchange = await self.rabbit_mq_client.channel.declare_exchange(
|
||||
name=rpc_exchange_name, type=ExchangeType.topic
|
||||
)
|
||||
# Publish the message to the exchange with the component name as the routing key
|
||||
await exchange.publish(message=pika_message, routing_key=route.component_name)
|
||||
|
||||
logging_debug(
|
||||
"###### RPC Request Published to exchg:(%s) routing_key=%s, msgId=%s",
|
||||
exchange_name,
|
||||
rpc_exchange_name,
|
||||
route.component_name,
|
||||
message_id
|
||||
message_id,
|
||||
)
|
||||
|
||||
return future
|
||||
|
||||
Reference in New Issue
Block a user