fix(health): use fresh httpx client per qdrant check to avoid stale connection pool
Some checks failed
CI / build (push) Failing after 10s

This commit is contained in:
Crypto Rug Munch 2026-07-03 17:07:20 +02:00
parent 01cb548f8f
commit 3c6b29563f

View file

@ -123,10 +123,11 @@ async def _check_neo4j() -> dict[str, Any]:
async def _check_qdrant() -> dict[str, Any]: async def _check_qdrant() -> dict[str, Any]:
try: try:
client = await _get_http_client() import httpx
resp = await client.get(f'{QDRANT_URL.rstrip(chr(47))}/collections') async with httpx.AsyncClient(timeout=5.0) as client:
data = resp.json() resp = await client.get(f"{QDRANT_URL.rstrip(chr(47))}/collections")
collections = data.get("result", {}).get("collections", []) data = resp.json()
collections = data.get("result", {}).get("collections", [])
return { return {
"healthy": resp.status_code == 200, "healthy": resp.status_code == 200,
"details": {"collection_count": len(collections)}, "details": {"collection_count": len(collections)},