Radeity commented on code in PR #13092:
URL:
https://github.com/apache/dolphinscheduler/pull/13092#discussion_r1045395581
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:
##########
@@ -234,6 +239,10 @@ private void scheduleParamCheck(String scheduleParamStr) {
if (scheduleParam == null) {
throw new ServiceException(Status.PARSE_SCHEDULE_PARAM_ERROR,
scheduleParamStr);
}
+ Date now = new Date();
+ if (now.after(scheduleParam.getStartTime())) {
+ throw new
ServiceException(Status.START_TIME_BEFORE_CURRENT_TIME_ERROR);
+ }
Review Comment:
> I think this check can only use for the create action, but not for
updating. I found the `scheduleParamCheck` is called by `updateSchedulesV2`, I
think it's better to split it.
Hi, @caishunfeng, `updateSchedulesV2` is called by updateSchedulesV2, either.
```java
try {
scheduleUpdate = scheduleUpdateRequest.mergeIntoSchedule(schedule);
// check update params
this.scheduleParamCheck(scheduleUpdateRequest.updateScheduleParam(scheduleUpdate));
}
```
--
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]