feat/#58 - fix unit test and deployment pipeline
Unit test coverage / pytest (push) Successful in 1m20s
/ build-and-push (push) Successful in 1m24s

This commit is contained in:
Stanislav Hejny
2025-07-21 10:49:28 +01:00
parent cf1804d23f
commit 3ee62b0437
2 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ env:
jobs: jobs:
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: general
services: services:
dind: dind:
image: docker:dind image: docker:dind
+8 -9
View File
@@ -10,6 +10,7 @@ from aio_pika.abc import AbstractIncomingMessage, AbstractRobustExchange
from opentelemetry import trace from opentelemetry import trace
from opentelemetry.trace import Tracer, TraceState from opentelemetry.trace import Tracer, TraceState
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
from pika.exchange_type import ExchangeType
from amqp.adapter.backpressure_handler import BackpressureHandler from amqp.adapter.backpressure_handler import BackpressureHandler
from amqp.adapter.cleverthis_service_adapter import AMQMessage, CleverThisServiceAdapter from amqp.adapter.cleverthis_service_adapter import AMQMessage, CleverThisServiceAdapter
@@ -312,20 +313,18 @@ class DataMessageHandler:
) )
# Get the exchange from the route # Get the exchange from the route
exchange_name = route.exchange rpc_exchange_name = route.exchange
exchange = await self.rabbit_mq_client.connection.get_exchange(exchange_name) 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
) )
# 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( logging_debug(
"###### RPC Request Published to exchg:(%s) routing_key=%s, msgId=%s", "###### RPC Request Published to exchg:(%s) routing_key=%s, msgId=%s",
exchange_name, rpc_exchange_name,
route.component_name, route.component_name,
message_id message_id,
) )
return future return future