From 1401c2e5f77d65ec2e39ae8f04dc8a8f306683bd Mon Sep 17 00:00:00 2001 From: Squidyu <1297554122@qq.com> Date: Tue, 3 Aug 2021 12:30:36 +0800 Subject: [PATCH] [Fix-5886][server] Enhanced scheduler delete check (#5936) * Add:Name verification remove the first and last spaces. * Update: wrong word: 'WAITTING' ->'WAITING' * Add: Strengthen verification Co-authored-by: Squid <2824638304@qq.com> --- .../dolphinscheduler/service/quartz/ProcessScheduleJob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/ProcessScheduleJob.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/ProcessScheduleJob.java index 2921ce2bba..762316ef22 100644 --- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/ProcessScheduleJob.java +++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/ProcessScheduleJob.java @@ -75,8 +75,8 @@ public class ProcessScheduleJob implements Job { // query schedule Schedule schedule = getProcessService().querySchedule(scheduleId); - if (schedule == null) { - logger.warn("process schedule does not exist in db,delete schedule job in quartz, projectId:{}, scheduleId:{}", projectId, scheduleId); + if (schedule == null || ReleaseState.OFFLINE == schedule.getReleaseState()) { + logger.warn("process schedule does not exist in db or process schedule offline,delete schedule job in quartz, projectId:{}, scheduleId:{}", projectId, scheduleId); deleteJob(projectId, scheduleId); return; }