Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix: fix the app max_active_requests been overwritten bug (#16513)

Yingchun Laif6ac98a37ddb
diff --git a/api/controllers/console/app/app.py b/api/controllers/console/app/app.py
index ac8d3c70cf2..bf29ea85b72 100644
--- a/api/controllers/console/app/app.py
+++ b/api/controllers/console/app/app.py
@@ -130,7 +130,6 @@ class AppApi(Resource):
parser.add_argument("icon_type", type=str, location="json")
parser.add_argument("icon", type=str, location="json")
parser.add_argument("icon_background", type=str, location="json")
- parser.add_argument("max_active_requests", type=int, location="json")
parser.add_argument("use_icon_as_answer_icon", type=bool, location="json")
args = parser.parse_args()
diff --git a/api/services/app_service.py b/api/services/app_service.py
index 1fd7cb5e335..effe1298ee0 100644
--- a/api/services/app_service.py
+++ b/api/services/app_service.py
@@ -9,7 +9,6 @@ from flask_sqlalchemy.pagination import Pagination
from configs import dify_config
from constants.model_template import default_app_templates
from core.agent.entities import AgentToolEntity
-from core.app.features.rate_limiting import RateLimit
from core.errors.error import LLMBadRequestError, ProviderTokenNotInitError
from core.model_manager import ModelManager
from core.model_runtime.entities.model_entities import ModelPropertyKey, ModelType
@@ -222,7 +221,6 @@ class AppService:
"""
app.name = args.get("name")
app.description = args.get("description", "")
- app.max_active_requests = args.get("max_active_requests")
app.icon_type = args.get("icon_type", "emoji")
app.icon = args.get("icon")
app.icon_background = args.get("icon_background")
@@ -231,9 +229,6 @@ class AppService:
app.updated_at = datetime.now(UTC).replace(tzinfo=None)
db.session.commit()
- if app.max_active_requests is not None:
- rate_limit = RateLimit(app.id, app.max_active_requests)
- rate_limit.flush_cache(use_local_value=True)
return app
def update_app_name(self, app: App, name: str) -> App: