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): Spin-up Database manager on rest.py (#8832)
Zamil Majdyae9bd87161f7
diff --git a/autogpt_platform/autogpt_libs/autogpt_libs/supabase_integration_credentials_store/store.py b/autogpt_platform/autogpt_libs/autogpt_libs/supabase_integration_credentials_store/store.pyindex 7cc731bf10..001ab9a352 100644--- a/autogpt_platform/autogpt_libs/autogpt_libs/supabase_integration_credentials_store/store.py+++ b/autogpt_platform/autogpt_libs/autogpt_libs/supabase_integration_credentials_store/store.py@@ -305,5 +305,5 @@ class SupabaseIntegrationCredentialsStore:return integrationsdef locked_user_integrations(self, user_id: str):- key = (self.db_manager, f"user:{user_id}", "integrations")+ key = (f"user:{user_id}", "integrations")return self.locks.locked(key)diff --git a/autogpt_platform/backend/backend/integrations/creds_manager.py b/autogpt_platform/backend/backend/integrations/creds_manager.pyindex 0fee2e3a81..9898afcc79 100644--- a/autogpt_platform/backend/backend/integrations/creds_manager.py+++ b/autogpt_platform/backend/backend/integrations/creds_manager.py@@ -130,7 +130,6 @@ class IntegrationCredentialsManager:def _acquire_lock(self, user_id: str, credentials_id: str, *args: str) -> RedisLock:key = (- self.store.db_manager,f"user:{user_id}",f"credentials:{credentials_id}",*args,diff --git a/autogpt_platform/backend/backend/rest.py b/autogpt_platform/backend/backend/rest.pyindex f56deaa1d2..e0da452ca2 100644--- a/autogpt_platform/backend/backend/rest.py+++ b/autogpt_platform/backend/backend/rest.py@@ -1,5 +1,5 @@from backend.app import run_processes-from backend.executor import ExecutionScheduler+from backend.executor import DatabaseManager, ExecutionSchedulerfrom backend.server.rest_api import AgentServer@@ -8,6 +8,7 @@ def main():Run all the processes required for the AutoGPT-server REST API."""run_processes(+ DatabaseManager(),ExecutionScheduler(),AgentServer(),)diff --git a/autogpt_platform/docker-compose.platform.yml b/autogpt_platform/docker-compose.platform.ymlindex 5d00f59f02..a09fed4c8b 100644--- a/autogpt_platform/docker-compose.platform.yml+++ b/autogpt_platform/docker-compose.platform.yml@@ -67,7 +67,6 @@ services:- PYRO_HOST=0.0.0.0- EXECUTIONSCHEDULER_HOST=rest_server- EXECUTIONMANAGER_HOST=executor- - DATABASEMANAGER_HOST=executor- FRONTEND_BASE_URL=http://localhost:3000- BACKEND_CORS_ALLOW_ORIGINS=["http://localhost:3000"]- ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!@@ -106,8 +105,6 @@ services:- ENABLE_AUTH=true- PYRO_HOST=0.0.0.0- AGENTSERVER_HOST=rest_server- - DATABASEMANAGER_HOST=0.0.0.0- - EXECUTIONMANAGER_HOST=0.0.0.0- ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!ports:- "8002:8000"