File 0001-add-link-to-active_connections.patch of Package mcp-gateway-registry
From 8e9fc6d3e7bac48197dd986ec854e410c1d8a66f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mark=C3=A9ta?= <meggy.calabkova@gmail.com>
Date: Fri, 18 Jul 2025 14:14:44 +0200
Subject: [PATCH] add link to active_connections
---
registry/health/service.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/registry/health/service.py b/registry/health/service.py
index 0e77bf4..77f7b22 100644
--- a/registry/health/service.py
+++ b/registry/health/service.py
@@ -195,6 +195,9 @@ class HealthMonitoringService:
self._cached_health_data: Dict = {}
self._cache_timestamp = 0
self._cache_ttl = settings.websocket_cache_ttl_seconds
+
+ # Link to connections
+ self.active_connections = self.websocket_manager.connections
async def initialize(self):
"""Initialize the health monitoring service."""
@@ -726,4 +729,4 @@ class HealthMonitoringService:
# Global health monitoring service instance
-health_service = HealthMonitoringService()
\ No newline at end of file
+health_service = HealthMonitoringService()
--
2.49.0