fix: health endpoint is failing
This commit is contained in:
parent
66673af56d
commit
624b4a6a61
1 changed files with 3 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ class HealthChecker:
|
||||||
# Test connection by creating a session
|
# Test connection by creating a session
|
||||||
session = engine.get_session()
|
session = engine.get_session()
|
||||||
if session:
|
if session:
|
||||||
await session.close()
|
session.close()
|
||||||
|
|
||||||
response_time = int((time.time() - start_time) * 1000)
|
response_time = int((time.time() - start_time) * 1000)
|
||||||
return ComponentHealth(
|
return ComponentHealth(
|
||||||
|
|
@ -190,14 +190,13 @@ class HealthChecker:
|
||||||
"""Check LLM provider health (non-critical)."""
|
"""Check LLM provider health (non-critical)."""
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
try:
|
try:
|
||||||
from cognee.infrastructure.llm.get_llm_client import get_llm_client
|
from cognee.infrastructure.llm.LLMGateway import LLMGateway
|
||||||
from cognee.infrastructure.llm.config import get_llm_config
|
from cognee.infrastructure.llm.config import get_llm_config
|
||||||
|
|
||||||
config = get_llm_config()
|
config = get_llm_config()
|
||||||
|
|
||||||
# Test actual API connection with minimal request
|
# Test actual API connection with minimal request
|
||||||
client = get_llm_client()
|
LLMGateway.show_prompt("test", "test")
|
||||||
await client.show_prompt("test", "test")
|
|
||||||
|
|
||||||
response_time = int((time.time() - start_time) * 1000)
|
response_time = int((time.time() - start_time) * 1000)
|
||||||
return ComponentHealth(
|
return ComponentHealth(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue