Let Quartz interrupt jobs on shutdown.
Original commit: elastic/x-pack-elasticsearch@3084f9b3f4
This commit is contained in:
parent
79b10f8c0d
commit
0438e61404
|
@ -53,6 +53,8 @@ public class AlertScheduler extends AbstractComponent {
|
|||
Properties properties = new Properties();
|
||||
properties.setProperty("org.quartz.threadPool.class", AlertQuartzThreadPool.class.getName());
|
||||
properties.setProperty(StdSchedulerFactory.PROP_SCHED_SKIP_UPDATE_CHECK, "true");
|
||||
properties.setProperty(StdSchedulerFactory.PROP_SCHED_INTERRUPT_JOBS_ON_SHUTDOWN, "true");
|
||||
properties.setProperty(StdSchedulerFactory.PROP_SCHED_INTERRUPT_JOBS_ON_SHUTDOWN_WITH_WAIT, "true");
|
||||
SchedulerFactory schFactory = new StdSchedulerFactory(properties);
|
||||
scheduler = schFactory.getScheduler();
|
||||
scheduler.setJobFactory(new SimpleJobFactory());
|
||||
|
|
Loading…
Reference in New Issue