You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ch...@apache.org on 2020/12/16 06:32:01 UTC

[incubator-dolphinscheduler] branch 1.3.4-prepare updated: fix time cover

This is an automated email from the ASF dual-hosted git repository.

chenxingchun pushed a commit to branch 1.3.4-prepare
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.4-prepare by this push:
     new d2032a5  fix time cover
     new 18ac68b  Merge pull request #4243 from CalvinKirs/1.3.4fix_time_erroor
d2032a5 is described below

commit d2032a53270f86dbded9629c60a37ead23f90757
Author: CalvinKirs <ac...@163.com>
AuthorDate: Wed Dec 16 14:27:07 2020 +0800

    fix time cover
---
 .../apache/dolphinscheduler/server/worker/task/shell/ShellTask.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/shell/ShellTask.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/shell/ShellTask.java
index 25ba500..3dacc1c 100644
--- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/shell/ShellTask.java
+++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/shell/ShellTask.java
@@ -138,8 +138,8 @@ public class ShellTask extends AbstractTask {
         CommandType.of(taskExecutionContext.getCmdTypeIfComplement()),
         taskExecutionContext.getScheduleTime());
     // replace variable TIME with $[YYYYmmddd...] in shell file when history run job and batch complement job
-    if (taskExecutionContext.getScheduleTime() != null) {
-      if (null == paramsMap) {
+    if (taskExecutionContext.getScheduleTime() != null && CommandType.COMPLEMENT_DATA.getCode() == taskExecutionContext.getCmdTypeIfComplement()) {
+      if (paramsMap == null) {
         paramsMap = new HashMap<>();
       }
       String dateTime = DateUtils.format(DateUtils.add(taskExecutionContext.getScheduleTime(), DAY_OF_MONTH, 1), Constants.PARAMETER_FORMAT_TIME);