fix: 定时任务死锁问题

This commit is contained in:
chenjianxing 2020-09-08 18:30:25 +08:00
parent 40780b9158
commit 0b8aeeaef2
2 changed files with 1 additions and 16 deletions

View File

@ -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<? extends Job> 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);

View File

@ -19,7 +19,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
System.out.println("================= 应用启动 =================");
try {
Thread.sleep(5 * 60 * 1000);
Thread.sleep(3 * 60 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}