kuhl-haus-mdp-servers 0.1.12__tar.gz → 0.1.14__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kuhl-haus-mdp-servers
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: Container image build repository for market data processing servers
5
5
  Author-Email: Tom Pounders <git@oldschool.engineer>
6
6
  License-File: LICENSE.txt
@@ -11,11 +11,11 @@ Project-URL: Documentation, https://github.com/kuhl-haus/kuhl-haus-mdp-servers/w
11
11
  Project-URL: Source, https://github.com/kuhl-haus/kuhl-haus-mdp-servers.git
12
12
  Project-URL: Changelog, https://github.com/kuhl-haus/kuhl-haus-mdp-servers/commits
13
13
  Project-URL: Tracker, https://github.com/kuhl-haus/kuhl-haus-mdp-servers/issues
14
- Requires-Python: <3.13,>=3.9.21
14
+ Requires-Python: >=3.14
15
15
  Requires-Dist: kuhl-haus-mdp
16
16
  Requires-Dist: websockets
17
17
  Requires-Dist: aio-pika
18
- Requires-Dist: redis[asyncio]
18
+ Requires-Dist: redis
19
19
  Requires-Dist: tenacity
20
20
  Requires-Dist: fastapi
21
21
  Requires-Dist: uvicorn[standard]
@@ -13,7 +13,7 @@ authors = [
13
13
  { name = "Tom Pounders", email = "git@oldschool.engineer" },
14
14
  ]
15
15
  readme = "README.md"
16
- requires-python = "<3.13,>=3.9.21"
16
+ requires-python = ">=3.14"
17
17
  license-files = [
18
18
  "LICENSE.txt",
19
19
  ]
@@ -25,7 +25,7 @@ dependencies = [
25
25
  "kuhl-haus-mdp",
26
26
  "websockets",
27
27
  "aio-pika",
28
- "redis[asyncio]",
28
+ "redis",
29
29
  "tenacity",
30
30
  "fastapi",
31
31
  "uvicorn[standard]",
@@ -33,7 +33,7 @@ dependencies = [
33
33
  "python-dotenv",
34
34
  "massive",
35
35
  ]
36
- version = "0.1.12"
36
+ version = "0.1.14"
37
37
 
38
38
  [project.urls]
39
39
  Homepage = "https://github.com/kuhl-haus/kuhl-haus-mdp-servers"
@@ -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,
@@ -206,7 +206,9 @@ async def health_check(response: Response):
206
206
  """Health check endpoint - always responsive"""
207
207
  try:
208
208
  ret: dict[str, Union[str, dict]] = {
209
+ "service": "Market Data Processor",
209
210
  "status": "OK",
211
+ "status_code": 1,
210
212
  "container_image": settings.container_image,
211
213
  "image_version": settings.image_version,
212
214
  }
@@ -225,7 +227,14 @@ async def health_check(response: Response):
225
227
  except Exception as e:
226
228
  logger.error(f"Health check error: {e}")
227
229
  response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
228
- return {"status": "ERROR", "message": "An unhandled exception occurred during health check."}
230
+ return {
231
+ "service": "Market Data Processor",
232
+ "status": "ERROR",
233
+ "status_code": 0,
234
+ "container_image": settings.container_image,
235
+ "image_version": settings.image_version,
236
+ "message": "An unhandled exception occurred during health check."
237
+ }
229
238
 
230
239
 
231
240
  if __name__ == "__main__":
@@ -88,7 +88,9 @@ async def health_check(response: Response):
88
88
  try:
89
89
  response.status_code = status.HTTP_200_OK
90
90
  return JSONResponse({
91
+ "service": "Widget Data Service",
91
92
  "status": "OK",
93
+ "status_code": 1,
92
94
  "container_image": settings.container_image,
93
95
  "image_version": settings.image_version,
94
96
  "active_ws_clients": len(active_ws_clients),
@@ -96,6 +98,14 @@ async def health_check(response: Response):
96
98
  except Exception as e:
97
99
  logger.error(f"Fatal error while processing health check: {e}")
98
100
  response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
101
+ return {
102
+ "service": "Widget Data Service",
103
+ "status": "ERROR",
104
+ "status_code": 0,
105
+ "container_image": settings.container_image,
106
+ "image_version": settings.image_version,
107
+ "message": "An unhandled exception occurred during health check."
108
+ }
99
109
 
100
110
 
101
111
  @app.websocket("/ws")