From a1bd425962667b37df527ee97f59b74fbe80665d Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Mon, 6 Nov 2023 21:34:24 -0800 Subject: [PATCH] Initial values for dynamic settings Signed-off-by: Owais Kazi --- .../flowframework/common/FlowFrameworkSettings.java | 4 ++-- .../transport/CreateWorkflowTransportAction.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/opensearch/flowframework/common/FlowFrameworkSettings.java b/src/main/java/org/opensearch/flowframework/common/FlowFrameworkSettings.java index 5ef506d51..faa3d61ae 100644 --- a/src/main/java/org/opensearch/flowframework/common/FlowFrameworkSettings.java +++ b/src/main/java/org/opensearch/flowframework/common/FlowFrameworkSettings.java @@ -17,12 +17,12 @@ public class FlowFrameworkSettings { private FlowFrameworkSettings() {} /** The upper limit of max workflows that can be created */ - public static final int MAX_WORKFLOWS_LIMIT = 34; + public static final int MAX_WORKFLOWS_LIMIT = 1000; /** This setting sets max workflows that can be created */ public static final Setting MAX_WORKFLOWS = Setting.intSetting( "plugins.flow_framework.max_workflows", - 0, + 100, 0, MAX_WORKFLOWS_LIMIT, Setting.Property.NodeScope, diff --git a/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java b/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java index 1f80b0e32..be100fbce 100644 --- a/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java +++ b/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java @@ -197,7 +197,7 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener= maxWorkflow) { - String errorMessage = "Maximum workflows limit reached" + maxWorkflow; + String errorMessage = "Maximum workflows limit reached " + maxWorkflow; logger.error(errorMessage); listener.onFailure(new FlowFrameworkException(errorMessage, RestStatus.BAD_REQUEST)); }