You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/12 13:21:55 UTC

[GitHub] [dolphinscheduler] zhuxt2015 commented on a diff in pull request #10677: [Enhancement][API] Suggest support batch copy workflow with scheduler

zhuxt2015 commented on code in PR #10677:
URL: https://github.com/apache/dolphinscheduler/pull/10677#discussion_r918962776


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -1800,6 +1802,17 @@ protected void doBatchOperateProcessDefinition(User loginUser,
                     }
                     processDefinition.setLocations(JSONUtils.toJsonString(jsonNodes));
                 }
+                //copy timing configuration
+                Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode);
+                if (scheduleObj != null) {
+                    scheduleObj.setProcessDefinitionCode(processDefinition.getCode());
+                    scheduleObj.setReleaseState(ReleaseState.OFFLINE);
+                    int insertResult = scheduleMapper.insert(scheduleObj);

Review Comment:
   Not necessarily, id will auto increment



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org