fix: Remove DatabaseManager heath-check from RestAPI service

This commit is contained in:
Zamil Majdy
2025-07-25 07:16:59 +07:00
parent 38ea49c0c3
commit 070e1c02ba

View File

@@ -14,7 +14,6 @@ from autogpt_libs.feature_flag.client import (
shutdown_launchdarkly,
)
from autogpt_libs.logging.utils import generate_uvicorn_config
from autogpt_libs.utils.cache import thread_cached
from fastapi.exceptions import RequestValidationError
from fastapi.routing import APIRoute
@@ -220,19 +219,8 @@ app.include_router(
app.mount("/external-api", external_app)
@thread_cached
def get_db_async_client():
from backend.executor import DatabaseManagerAsyncClient
return backend.util.service.get_service_client(
DatabaseManagerAsyncClient,
health_check=False,
)
@app.get(path="/health", tags=["health"], dependencies=[])
async def health():
await get_db_async_client().health_check_async()
return {"status": "healthy"}