summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:12:40 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:12:40 +0900
commitc3560fdd637c4f034cac4f7371aeed65d018bc91 (patch)
treec50d3318c0c37ca634012b7113a80c0d6e356844 /shared
parentec792a3d379c911165038d8da5b339df6ca3fccd (diff)
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().
Diffstat (limited to 'shared')
-rw-r--r--shared/src/shared/broker.py4
1 files changed, 4 insertions, 0 deletions
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()