Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix: Remove DatabaseManager heath-check from RestAPI service

Zamil Majdy070e1c02ba7b
diff --git a/autogpt_platform/backend/backend/server/rest_api.py b/autogpt_platform/backend/backend/server/rest_api.py
index 19c503a1d3..9eb75251ef 100644
--- a/autogpt_platform/backend/backend/server/rest_api.py
+++ b/autogpt_platform/backend/backend/server/rest_api.py
@@ -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"}