kuhl-haus-mdp-servers 0.1.12__tar.gz → 0.1.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/PKG-INFO +1 -1
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/pyproject.toml +1 -1
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/mdl_server.py +3 -0
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/mdp_server.py +2 -1
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/wds_server.py +2 -0
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/LICENSE.txt +0 -0
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/README.md +0 -0
- {kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/__init__.py +0 -0
{kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/mdl_server.py
RENAMED
|
@@ -239,8 +239,10 @@ async def health_check(response: Response):
|
|
|
239
239
|
"""Health check endpoint"""
|
|
240
240
|
# The server should be connected to MDQ even when the WebSocket client is not running.
|
|
241
241
|
status_message = "OK"
|
|
242
|
+
status_code = 1
|
|
242
243
|
if not massive_data_queues.connection_status["connected"]:
|
|
243
244
|
status_message = "Unhealthy"
|
|
245
|
+
status_code = 0
|
|
244
246
|
response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
|
|
245
247
|
# TODO: Investigate if this caused health check failures in production during off-hours.
|
|
246
248
|
# if settings.auto_start and not massive_data_listener.connection_status["connected"]:
|
|
@@ -249,6 +251,7 @@ async def health_check(response: Response):
|
|
|
249
251
|
return {
|
|
250
252
|
"service": "Massive Data Listener",
|
|
251
253
|
"status": status_message,
|
|
254
|
+
"status_code": status_code,
|
|
252
255
|
"auto-start": settings.auto_start,
|
|
253
256
|
"container_image": settings.container_image,
|
|
254
257
|
"image_version": settings.image_version,
|
{kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/mdp_server.py
RENAMED
|
@@ -207,6 +207,7 @@ async def health_check(response: Response):
|
|
|
207
207
|
try:
|
|
208
208
|
ret: dict[str, Union[str, dict]] = {
|
|
209
209
|
"status": "OK",
|
|
210
|
+
"status_code": 1,
|
|
210
211
|
"container_image": settings.container_image,
|
|
211
212
|
"image_version": settings.image_version,
|
|
212
213
|
}
|
|
@@ -225,7 +226,7 @@ async def health_check(response: Response):
|
|
|
225
226
|
except Exception as e:
|
|
226
227
|
logger.error(f"Health check error: {e}")
|
|
227
228
|
response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
|
|
228
|
-
return {"status": "ERROR", "message": "An unhandled exception occurred during health check."}
|
|
229
|
+
return {"status": "ERROR", "status_code": 0, "message": "An unhandled exception occurred during health check."}
|
|
229
230
|
|
|
230
231
|
|
|
231
232
|
if __name__ == "__main__":
|
{kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/wds_server.py
RENAMED
|
@@ -89,6 +89,7 @@ async def health_check(response: Response):
|
|
|
89
89
|
response.status_code = status.HTTP_200_OK
|
|
90
90
|
return JSONResponse({
|
|
91
91
|
"status": "OK",
|
|
92
|
+
"status_code": 1,
|
|
92
93
|
"container_image": settings.container_image,
|
|
93
94
|
"image_version": settings.image_version,
|
|
94
95
|
"active_ws_clients": len(active_ws_clients),
|
|
@@ -96,6 +97,7 @@ async def health_check(response: Response):
|
|
|
96
97
|
except Exception as e:
|
|
97
98
|
logger.error(f"Fatal error while processing health check: {e}")
|
|
98
99
|
response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
|
|
100
|
+
return {"status": "ERROR", "status_code": 0, "message": "An unhandled exception occurred during health check."}
|
|
99
101
|
|
|
100
102
|
|
|
101
103
|
@app.websocket("/ws")
|
|
File without changes
|
|
File without changes
|
{kuhl_haus_mdp_servers-0.1.12 → kuhl_haus_mdp_servers-0.1.13}/src/kuhl_haus/servers/__init__.py
RENAMED
|
File without changes
|