From 2abacd2a2dea4d8cd29aac7a89f56654f508679e Mon Sep 17 00:00:00 2001 From: lz <1741673381@qq.com> Date: Thu, 14 Nov 2024 15:34:34 +0800 Subject: [PATCH] export configuration 'CODE_EXECUTION_TIMEOUT' to .env (#10688) Co-authored-by: liuzhu --- docker/.env.example | 3 +++ docker/docker-compose.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker/.env.example b/docker/.env.example index 0b181d831a..cf09f72bce 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -689,6 +689,9 @@ TEMPLATE_TRANSFORM_MAX_LENGTH=80000 CODE_MAX_STRING_ARRAY_LENGTH=30 CODE_MAX_OBJECT_ARRAY_LENGTH=30 CODE_MAX_NUMBER_ARRAY_LENGTH=1000 +CODE_EXECUTION_CONNECT_TIMEOUT=10 +CODE_EXECUTION_READ_TIMEOUT=60 +CODE_EXECUTION_WRITE_TIMEOUT=10 # Workflow runtime configuration WORKFLOW_MAX_EXECUTION_STEPS=500 diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index d9ff965473..e4b3d8f311 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -244,6 +244,9 @@ x-shared-env: &shared-api-worker-env RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: ${RESET_PASSWORD_TOKEN_EXPIRY_MINUTES:-5} CODE_EXECUTION_ENDPOINT: ${CODE_EXECUTION_ENDPOINT:-http://sandbox:8194} CODE_EXECUTION_API_KEY: ${SANDBOX_API_KEY:-dify-sandbox} + CODE_EXECUTION_CONNECT_TIMEOUT: ${CODE_EXECUTION_CONNECT_TIMEOUT:-10} + CODE_EXECUTION_READ_TIMEOUT: ${CODE_EXECUTION_READ_TIMEOUT:-60} + CODE_EXECUTION_WRITE_TIMEOUT: ${CODE_EXECUTION_WRITE_TIMEOUT:-10} CODE_MAX_NUMBER: ${CODE_MAX_NUMBER:-9223372036854775807} CODE_MIN_NUMBER: ${CODE_MIN_NUMBER:--9223372036854775808} CODE_MAX_DEPTH: ${CODE_MAX_DEPTH:-5}