zhongjiajie commented on code in PR #10376:
URL: https://github.com/apache/dolphinscheduler/pull/10376#discussion_r894518349
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java:
##########
@@ -809,4 +814,10 @@ private Constants() {
* tenant
*/
public static final int TENANT_FULL_NAME_MAX_LENGTH = 30;
+
+ /**
+ * schedule time
+ */
+ public static final int SCHEDULE_TIME_MAX_LENGTH = 100;
Review Comment:
Maybe we should add some docs about why we should set this value to `100`
instead of `200` or other values
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -774,7 +775,12 @@ private int createComplementDataCommand(Date scheduleDate)
{
if
(cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
}
- cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.format(scheduleDate, "yyyy-MM-dd HH:mm:ss", null));
+ if(cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)){
+ cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST,
cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).substring(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).indexOf(",")+1));
+ }
+ if(cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)){
+ cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.format(scheduleDate, "yyyy-MM-dd HH:mm:ss", null));
Review Comment:
I think we have `Constants` value with both `","` and `"yyyy-MM-dd
HH:mm:ss"`, should avoid using bare common stirng in our code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]