Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
feat: introduce APP_MAX_EXECUTION_TIME (#5167)
Yeuoly0cccf9c67d24
diff --git a/api/.env.example b/api/.env.exampleindex bee62cfe0bc..571f5b168ea 100644--- a/api/.env.example+++ b/api/.env.example@@ -203,3 +203,6 @@ INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=1000WORKFLOW_MAX_EXECUTION_STEPS=500WORKFLOW_MAX_EXECUTION_TIME=1200WORKFLOW_CALL_MAX_DEPTH=5++# App configuration+APP_MAX_EXECUTION_TIME=1200\ No newline at end of filediff --git a/api/config.py b/api/config.pyindex bb9f85781e5..53cc6ce393b 100644--- a/api/config.py+++ b/api/config.py@@ -85,6 +85,7 @@ DEFAULTS = {'WORKFLOW_MAX_EXECUTION_STEPS': 500,'WORKFLOW_MAX_EXECUTION_TIME': 1200,'WORKFLOW_CALL_MAX_DEPTH': 5,+ 'APP_MAX_EXECUTION_TIME': 1200,}@@ -372,6 +373,7 @@ class Config:self.WORKFLOW_MAX_EXECUTION_STEPS = int(get_env('WORKFLOW_MAX_EXECUTION_STEPS'))self.WORKFLOW_MAX_EXECUTION_TIME = int(get_env('WORKFLOW_MAX_EXECUTION_TIME'))self.WORKFLOW_CALL_MAX_DEPTH = int(get_env('WORKFLOW_CALL_MAX_DEPTH'))+ self.APP_MAX_EXECUTION_TIME = int(get_env('APP_MAX_EXECUTION_TIME'))# Moderation in app Configurations.self.OUTPUT_MODERATION_BUFFER_SIZE = int(get_env('OUTPUT_MODERATION_BUFFER_SIZE'))diff --git a/api/core/app/apps/base_app_queue_manager.py b/api/core/app/apps/base_app_queue_manager.pyindex 43a44819f94..eff07cc071d 100644--- a/api/core/app/apps/base_app_queue_manager.py+++ b/api/core/app/apps/base_app_queue_manager.py@@ -5,6 +5,7 @@ from collections.abc import Generatorfrom enum import Enumfrom typing import Any+from flask import current_appfrom sqlalchemy.orm import DeclarativeMetafrom core.app.entities.app_invoke_entities import InvokeFrom@@ -46,8 +47,8 @@ class AppQueueManager:Listen to queue:return:"""- # wait for 10 minutes to stop listen- listen_timeout = 600+ # wait for APP_MAX_EXECUTION_TIME seconds to stop listen+ listen_timeout = current_app.config.get("APP_MAX_EXECUTION_TIME")start_time = time.time()last_ping_time = 0