From 485eb29e03002cc568b58f3ec001fcfaade45676 Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Thu, 7 May 2020 15:06:16 +0530 Subject: [PATCH] Added timeout in DslActionDTO which is used to represent actions inside a layout and in turn is used for page load action execution. --- .../src/main/java/com/appsmith/server/dtos/DslActionDTO.java | 3 +++ .../com/appsmith/server/services/LayoutActionServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/DslActionDTO.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/DslActionDTO.java index e5aac9deb6..8baa2a9181 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/DslActionDTO.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/DslActionDTO.java @@ -6,6 +6,8 @@ import lombok.Setter; import java.util.Set; +import static com.appsmith.external.constants.ActionConstants.DEFAULT_ACTION_EXECUTION_TIMEOUT_MS; + @Getter @Setter public class DslActionDTO { @@ -13,4 +15,5 @@ public class DslActionDTO { String name; PluginType pluginType; Set jsonPathKeys; + Integer timeoutInMillisecond = DEFAULT_ACTION_EXECUTION_TIMEOUT_MS; } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/LayoutActionServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/LayoutActionServiceImpl.java index e134de092f..58f7d2229a 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/LayoutActionServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/LayoutActionServiceImpl.java @@ -175,6 +175,9 @@ public class LayoutActionServiceImpl implements LayoutActionService { newAction.setPluginType(action.getPluginType()); newAction.setJsonPathKeys(action.getJsonPathKeys()); newAction.setName(action.getName()); + if (action.getActionConfiguration() != null) { + newAction.setTimeoutInMillisecond(action.getActionConfiguration().getTimeoutInMillisecond()); + } return newAction; }) .collect(toSet())