fix(backend): Spin-up Database manager on rest.py (#8832)

This commit is contained in:
Zamil Majdy 2024-11-27 23:39:08 +07:00 committed by GitHub
parent a556995d1f
commit ae9bd87161
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 3 additions and 6 deletions

View File

@ -305,5 +305,5 @@ class SupabaseIntegrationCredentialsStore:
return integrations
def 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)

View File

@ -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,

View File

@ -1,5 +1,5 @@
from backend.app import run_processes
from backend.executor import ExecutionScheduler
from backend.executor import DatabaseManager, ExecutionScheduler
from 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(),
)

View File

@ -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"