Skip to content

Commit

Permalink
Initial values for dynamic settings
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <[email protected]>
  • Loading branch information
owaiskazi19 committed Nov 7, 2023
1 parent 3d31567 commit a1bd425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer> MAX_WORKFLOWS = Setting.intSetting(
"plugins.flow_framework.max_workflows",
0,
100,
0,
MAX_WORKFLOWS_LIMIT,
Setting.Property.NodeScope,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener<Work
*/
protected void onSearchGlobalContext(SearchResponse response, ActionListener listener, Integer maxWorkflow) {
if (response.getHits().getTotalHits().value >= 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));
}
Expand Down

0 comments on commit a1bd425

Please sign in to comment.