rickchengx commented on code in PR #14430:
URL:
https://github.com/apache/dolphinscheduler/pull/14430#discussion_r1251413646
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:
##########
@@ -167,6 +167,13 @@ public Map<String, Object> insertSchedule(User loginUser,
executorService.checkProcessDefinitionValid(projectCode,
processDefinition, processDefineCode,
processDefinition.getVersion());
+ Schedule scheduleExists =
+ scheduleMapper.queryByProcessDefinitionCode(processDefineCode);
+ if (scheduleExists != null) {
+ throw new ServiceException(Status.SCHEDULE_ALREADY_EXISTS,
processDefineCode,
Review Comment:
Could we put a message in the result to tell the reason to the user, like
below:
```
if (scheduleExists != null) {
log.error("xxx");
putMsg(result, Status.XXX);
return result;
}
```
--
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]