diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java index a797ce5286..7b4b1ee063 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java @@ -490,7 +490,7 @@ public class ProcessDefinitionService extends BaseDAGService { // set status schedule.setReleaseState(ReleaseState.OFFLINE); scheduleMapper.update(schedule); - deleteSchedule(project.getId(), id); + deleteSchedule(project.getId(), schedule.getId()); } break; } diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/SchedulerService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/SchedulerService.java index 2766a101e1..d4515c79f3 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/SchedulerService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/SchedulerService.java @@ -456,14 +456,14 @@ public class SchedulerService extends BaseService { /** * delete schedule */ - public static void deleteSchedule(int projectId, int processId) throws RuntimeException{ - logger.info("delete schedules of project id:{}, flow id:{}", projectId, processId); + public static void deleteSchedule(int projectId, int scheduleId) throws RuntimeException{ + logger.info("delete schedules of project id:{}, schedule id:{}", projectId, scheduleId); - String jobName = QuartzExecutors.buildJobName(processId); + String jobName = QuartzExecutors.buildJobName(scheduleId); String jobGroupName = QuartzExecutors.buildJobGroupName(projectId); if(!QuartzExecutors.getInstance().deleteJob(jobName, jobGroupName)){ - logger.warn("set offline failure:projectId:{},processId:{}",projectId,processId); + logger.warn("set offline failure:projectId:{},scheduleId:{}",projectId,scheduleId); throw new RuntimeException(String.format("set offline failure")); }