From 84f829cee187a692d95d74601e3b763b6117516f Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Mon, 13 Jan 2025 11:08:53 -0800 Subject: [PATCH] Limit workflow timeout to a range of 1 to 300 seconds Signed-off-by: Junwei Dai # Conflicts: # src/main/java/org/opensearch/flowframework/util/WorkflowTimeoutUtility.java --- .../opensearch/flowframework/util/WorkflowTimeoutUtility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/flowframework/util/WorkflowTimeoutUtility.java b/src/main/java/org/opensearch/flowframework/util/WorkflowTimeoutUtility.java index e5956e92..7ecad2e1 100644 --- a/src/main/java/org/opensearch/flowframework/util/WorkflowTimeoutUtility.java +++ b/src/main/java/org/opensearch/flowframework/util/WorkflowTimeoutUtility.java @@ -18,7 +18,6 @@ import org.opensearch.flowframework.transport.GetWorkflowStateAction; import org.opensearch.flowframework.transport.GetWorkflowStateRequest; import org.opensearch.flowframework.transport.WorkflowResponse; -import org.opensearch.search.aggregations.metrics.Min; import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.ThreadPool; @@ -34,6 +33,7 @@ public class WorkflowTimeoutUtility { private static final Logger logger = LogManager.getLogger(WorkflowTimeoutUtility.class); private static final TimeValue MAX_TIMEOUT_MILLIS = TimeValue.timeValueSeconds(300); private static final TimeValue MIN_TIMEOUT_MILLIS = TimeValue.timeValueSeconds(1); + /** * Schedules a timeout task for a workflow execution. *