From 0e46b48420e5d99ffebf0d6753e0d687c7e0726a Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 11 Sep 2024 15:44:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E7=BD=AE=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=B1=A0=E5=B9=B6=E5=8F=91=E6=95=B0=E9=87=8F=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E6=8A=A2=E5=8D=A0=E8=BF=87=E5=A4=9A=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/utils/CommonThreadPool.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/common/src/main/java/io/dataease/utils/CommonThreadPool.java b/sdk/common/src/main/java/io/dataease/utils/CommonThreadPool.java index 48aaec3420..17f9c30a7c 100644 --- a/sdk/common/src/main/java/io/dataease/utils/CommonThreadPool.java +++ b/sdk/common/src/main/java/io/dataease/utils/CommonThreadPool.java @@ -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); }