Skip to content

Commit 437d8ca

Browse files
brave-leeJinyLeeChina
and
JinyLeeChina
authored
[Fix-13505] [complement] enter startup parameters, the complement task is not started (#13510)
* fix 13496 * fix 13505 --------- Co-authored-by: JinyLeeChina <[email protected]>
1 parent 6434797 commit 437d8ca

File tree

1 file changed

+4
-3
lines changed
  • dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder

1 file changed

+4
-3
lines changed

Diff for: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ private BusinessTimeUtils() {
4848
*/
4949
public static Map<String, String> getBusinessTime(CommandType commandType, Date runTime) {
5050
Date businessDate;
51+
Map<String, String> result = new HashMap<>();
5152
switch (commandType) {
5253
case COMPLEMENT_DATA:
53-
businessDate = DateUtils.addDays(runTime, -1);
54-
break;
54+
if (runTime == null) {
55+
return result;
56+
}
5557
case START_PROCESS:
5658
case START_CURRENT_TASK_PROCESS:
5759
case RECOVER_TOLERANCE_FAULT_PROCESS:
@@ -70,7 +72,6 @@ public static Map<String, String> getBusinessTime(CommandType commandType, Date
7072
break;
7173
}
7274
Date businessCurrentDate = addDays(businessDate, 1);
73-
Map<String, String> result = new HashMap<>();
7475
result.put(Constants.PARAMETER_CURRENT_DATE, format(businessCurrentDate, PARAMETER_FORMAT_DATE));
7576
result.put(Constants.PARAMETER_BUSINESS_DATE, format(businessDate, PARAMETER_FORMAT_DATE));
7677
result.put(Constants.PARAMETER_DATETIME, format(businessCurrentDate, PARAMETER_FORMAT_TIME));

0 commit comments

Comments
 (0)