fix(health): use fresh httpx client per qdrant check to avoid stale connection pool
Some checks failed
CI / build (push) Failing after 10s
Some checks failed
CI / build (push) Failing after 10s
This commit is contained in:
parent
01cb548f8f
commit
3c6b29563f
1 changed files with 5 additions and 4 deletions
|
|
@ -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)},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue