diff --git a/api/app/core/config.py b/api/app/core/config.py index 64c5520e..56a07f3f 100644 --- a/api/app/core/config.py +++ b/api/app/core/config.py @@ -241,6 +241,8 @@ class Settings: SMTP_PORT: int = int(os.getenv("SMTP_PORT", "587")) SMTP_USER: str = os.getenv("SMTP_USER", "") SMTP_PASSWORD: str = os.getenv("SMTP_PASSWORD", "") + + SANDBOX_URL: str = os.getenv("SANDBOX_URL", "") REFLECTION_INTERVAL_SECONDS: float = float(os.getenv("REFLECTION_INTERVAL_SECONDS", "300")) HEALTH_CHECK_SECONDS: float = float(os.getenv("HEALTH_CHECK_SECONDS", "600")) diff --git a/api/app/core/workflow/nodes/code/node.py b/api/app/core/workflow/nodes/code/node.py index 69c660fe..d715be7d 100644 --- a/api/app/core/workflow/nodes/code/node.py +++ b/api/app/core/workflow/nodes/code/node.py @@ -14,6 +14,7 @@ from app.core.workflow.engine.variable_pool import VariablePool from app.core.workflow.nodes import BaseNode from app.core.workflow.nodes.code.config import CodeNodeConfig from app.core.workflow.variable.base_variable import VariableType, DEFAULT_VALUE +from app.core.config import settings logger = logging.getLogger(__name__) @@ -131,7 +132,7 @@ class CodeNode(BaseNode): async with httpx.AsyncClient(timeout=60) as client: response = await client.post( - "http://sandbox:8194/v1/sandbox/run", + f"{settings.SANDBOX_URL}:8194/v1/sandbox/run", headers={ "x-api-key": 'redbear-sandbox' },