From 0b8aeeaef240383f8296b5e47f2be0327d77be7e Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 8 Sep 2020 18:30:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=AD=BB=E9=94=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/sechedule/ScheduleManager.java | 15 --------------- .../io/metersphere/listener/AppStartListener.java | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/backend/src/main/java/io/metersphere/job/sechedule/ScheduleManager.java b/backend/src/main/java/io/metersphere/job/sechedule/ScheduleManager.java index 5f24bd8235..c32dedca52 100644 --- a/backend/src/main/java/io/metersphere/job/sechedule/ScheduleManager.java +++ b/backend/src/main/java/io/metersphere/job/sechedule/ScheduleManager.java @@ -39,18 +39,6 @@ public class ScheduleManager { .startNow().build(); scheduler.scheduleJob(jd, trigger); - - try { - - if (!scheduler.isShutdown()) { - scheduler.start(); - } - - } catch (SchedulerException e) { - LogUtil.error(e.getMessage(), e); - e.printStackTrace(); - throw new RuntimeException(e); - } } public void addSimpleJob(JobKey jobKey, TriggerKey triggerKey, Class cls, int repeatIntervalTime) throws SchedulerException { @@ -89,9 +77,6 @@ public class ScheduleManager { scheduler.scheduleJob(jobDetail, trigger); - if (!scheduler.isShutdown()) { - scheduler.start(); - } } catch (Exception e) { LogUtil.error(e.getMessage(), e); throw new RuntimeException(e); diff --git a/backend/src/main/java/io/metersphere/listener/AppStartListener.java b/backend/src/main/java/io/metersphere/listener/AppStartListener.java index e76253565d..e2068d3768 100644 --- a/backend/src/main/java/io/metersphere/listener/AppStartListener.java +++ b/backend/src/main/java/io/metersphere/listener/AppStartListener.java @@ -19,7 +19,7 @@ public class AppStartListener implements ApplicationListener