Merge pull request #12294 from dataease/pr@dev2@fixds

Pr@dev2@fixds
This commit is contained in:
taojinlong
2024-09-19 16:08:13 +08:00
committed by GitHub
3 changed files with 29 additions and 71 deletions

View File

@@ -15,6 +15,8 @@ public class CommonThreadPool {
private int maxQueueSize = 10;
private int maximumPoolSize = 10;
private int keepAliveSeconds = 600;
private ScheduledThreadPoolExecutor scheduledThreadPoolExecutor;
@@ -22,6 +24,7 @@ public class CommonThreadPool {
@PostConstruct
public void init() {
scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(corePoolSize);
scheduledThreadPoolExecutor.setMaximumPoolSize(maximumPoolSize);
scheduledThreadPoolExecutor.setKeepAliveTime(keepAliveSeconds, TimeUnit.SECONDS);
}