ruff format

This commit is contained in:
Daulet Amirkhanov 2025-09-12 15:48:38 +01:00
parent db77ecc969
commit 8012d3071f
2 changed files with 8 additions and 1 deletions

View file

@ -226,7 +226,11 @@ async def cloud_health_check():
return JSONResponse(status_code=status_code, content=health_status.model_dump())
except Exception as e:
return JSONResponse(status_code=503, content={"status": "unhealthy", "error": f"Cloud health check failed: {str(e)}"})
return JSONResponse(
status_code=503,
content={"status": "unhealthy", "error": f"Cloud health check failed: {str(e)}"},
)
app.include_router(get_auth_router(), prefix="/api/v1/auth", tags=["auth"])

View file

@ -329,8 +329,10 @@ class HealthChecker:
start_time = time.time()
try:
from cognee.modules.cloud.operations import check_api_key
# TODO: consider moving this to a more appropriate place
from cognee.api.v1.sync.sync import _get_cloud_auth_token
await check_api_key(_get_cloud_auth_token())
response_time = int((time.time() - start_time) * 1000)
return ComponentHealth(
@ -349,5 +351,6 @@ class HealthChecker:
details=f"Connection failed: {str(e)}",
)
# Global health checker instance
health_checker = HealthChecker()