From c3560fdd637c4f034cac4f7371aeed65d018bc91 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:12:40 +0900 Subject: feat(services): integrate structlog, healthcheck, metrics, and Telegram Replace logging.basicConfig/getLogger with structlog setup_logging in all four service entry points. Add HealthCheckServer, ServiceMetrics, and TelegramNotifier initialization to each service. Update OrderExecutor to accept a notifier parameter and send order notifications. Add RedisBroker.ping() for health checks. Update executor tests with notifier=AsyncMock(). --- shared/src/shared/broker.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shared') diff --git a/shared/src/shared/broker.py b/shared/src/shared/broker.py index 9a50441..0f87b06 100644 --- a/shared/src/shared/broker.py +++ b/shared/src/shared/broker.py @@ -38,6 +38,10 @@ class RedisBroker: messages.append(json.loads(payload)) return messages + async def ping(self) -> bool: + """Ping the Redis server; return True if reachable.""" + return await self._redis.ping() + async def close(self) -> None: """Close the Redis connection.""" await self._redis.aclose() -- cgit v1.2.3