This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch 2.0.8-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.8-prepare by this push:
new 437d8ca66f [Fix-13505] [complement] enter startup parameters, the
complement task is not started (#13510)
437d8ca66f is described below
commit 437d8ca66f746c6895917ad3440749a6b3b32f31
Author: JinYong Li <[email protected]>
AuthorDate: Sun Feb 5 13:53:41 2023 +0800
[Fix-13505] [complement] enter startup parameters, the complement task is
not started (#13510)
* fix 13496
* fix 13505
---------
Co-authored-by: JinyLeeChina <[email protected]>
---
.../common/utils/placeholder/BusinessTimeUtils.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java
index f5bced3e91..4c6787f9cb 100644
---
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java
+++
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java
@@ -48,10 +48,12 @@ public class BusinessTimeUtils {
*/
public static Map<String, String> getBusinessTime(CommandType commandType,
Date runTime) {
Date businessDate;
+ Map<String, String> result = new HashMap<>();
switch (commandType) {
case COMPLEMENT_DATA:
- businessDate = DateUtils.addDays(runTime, -1);
- break;
+ if (runTime == null) {
+ return result;
+ }
case START_PROCESS:
case START_CURRENT_TASK_PROCESS:
case RECOVER_TOLERANCE_FAULT_PROCESS:
@@ -70,7 +72,6 @@ public class BusinessTimeUtils {
break;
}
Date businessCurrentDate = addDays(businessDate, 1);
- Map<String, String> result = new HashMap<>();
result.put(Constants.PARAMETER_CURRENT_DATE,
format(businessCurrentDate, PARAMETER_FORMAT_DATE));
result.put(Constants.PARAMETER_BUSINESS_DATE, format(businessDate,
PARAMETER_FORMAT_DATE));
result.put(Constants.PARAMETER_DATETIME, format(businessCurrentDate,
PARAMETER_FORMAT_TIME));