Skip to content

Commit 88b44ce

Browse files
committed
fix(health): forward selected postgres driver
1 parent 88cf659 commit 88b44ce

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

pg_llm_batch/health.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,14 @@ def public_health_report(report: Dict[str, Any]) -> Dict[str, Any]:
154154
}
155155

156156

157-
def serve_healthz(dsn: str, host: str = "0.0.0.0", port: int = 8080) -> None:
158-
"""Serve a minimal ``/healthz`` endpoint (blocking)."""
157+
def serve_healthz(
158+
dsn: str,
159+
host: str = "0.0.0.0",
160+
port: int = 8080,
161+
*,
162+
postgres_driver: PostgresDriverPort | None = None,
163+
) -> None:
164+
"""Serve ``/healthz`` using the selected PostgreSQL driver boundary."""
159165
from http.server import BaseHTTPRequestHandler, HTTPServer
160166

161167
class _Handler(BaseHTTPRequestHandler):
@@ -167,7 +173,9 @@ def do_GET(self) -> None: # noqa: N802 (stdlib naming)
167173
self.send_response(404)
168174
self.end_headers()
169175
return
170-
report = public_health_report(check_health(dsn))
176+
report = public_health_report(
177+
check_health(dsn, postgres_driver=postgres_driver)
178+
)
171179
body = json.dumps(report).encode("utf-8")
172180
self.send_response(200 if report["ready"] else 503)
173181
self.send_header("Content-Type", "application/json")

0 commit comments

Comments
 (0)