JobExecutor使用简化,在没有配置线程池时,使用默认的线程池

This commit is contained in:
aoshiguchen
2022-09-21 22:20:31 +08:00
parent 023d33c416
commit 563704d588
2 changed files with 8 additions and 3 deletions
@@ -49,8 +49,6 @@ public class JobConfig {
public JobExecutor jobExecutor() {
JobExecutor executor = new JobExecutor();
executor.setJobSource(jobInfoService);
executor.setThreadPoolExecutor(new ThreadPoolExecutor(5, 20, 10L, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(), new CustomThreadFactory("JobPool")));
executor.setJobCallback(jobLogService);
return executor;
}