Skip to content

Commit

Permalink
fix(backend): Spin-up Database manager on rest.py (#8832)
Browse files Browse the repository at this point in the history
  • Loading branch information
majdyz authored and aarushik93 committed Dec 1, 2024
1 parent fc9329a commit b1830ee
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,5 @@ def _get_user_integrations(self, user_id: str) -> UserIntegrations:
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)
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def delete(self, user_id: str, credentials_id: str) -> None:

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,
Expand Down
3 changes: 2 additions & 1 deletion autogpt_platform/backend/backend/rest.py
Original file line number Diff line number Diff line change
@@ -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


Expand All @@ -8,6 +8,7 @@ def main():
Run all the processes required for the AutoGPT-server REST API.
"""
run_processes(
DatabaseManager(),
ExecutionScheduler(),
AgentServer(),
)
Expand Down
3 changes: 0 additions & 3 deletions autogpt_platform/docker-compose.platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!!
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit b1830ee

Please sign in to comment.