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(backend): Avoid broken process pool by not failing process initializer (#9907)
Zamil Majdy79319ad1a73e
diff --git a/autogpt_platform/backend/backend/executor/manager.py b/autogpt_platform/backend/backend/executor/manager.pyindex fa0fa8fdd1..ff467e9b44 100644--- a/autogpt_platform/backend/backend/executor/manager.py+++ b/autogpt_platform/backend/backend/executor/manager.py@@ -1097,14 +1097,16 @@ class ExecutionManager(AppProcess):def get_db_client() -> "DatabaseManagerClient":from backend.executor import DatabaseManagerClient- return get_service_client(DatabaseManagerClient)+ # Disable health check for the service client to avoid breaking process initializer.+ return get_service_client(DatabaseManagerClient, health_check=False)@thread_cacheddef get_notification_service() -> "NotificationManagerClient":from backend.notifications import NotificationManagerClient- return get_service_client(NotificationManagerClient)+ # Disable health check for the service client to avoid breaking process initializer.+ return get_service_client(NotificationManagerClient, health_check=False)def send_execution_update(entry: GraphExecution | NodeExecutionResult | None):diff --git a/autogpt_platform/backend/backend/util/service.py b/autogpt_platform/backend/backend/util/service.pyindex a718b3d0a8..91eef36def 100644--- a/autogpt_platform/backend/backend/util/service.py+++ b/autogpt_platform/backend/backend/util/service.py@@ -247,6 +247,7 @@ ASC = TypeVar("ASC", bound=AppServiceClient)def get_service_client(service_client_type: Type[ASC],call_timeout: int | None = api_call_timeout,+ health_check: bool = True,) -> ASC:class DynamicClient:def __init__(self):@@ -351,7 +352,8 @@ def get_service_client(return sync_methodclient = cast(ASC, DynamicClient())- client.health_check()+ if health_check:+ client.health_check()return client