From c3ce2bc5d069ba57309567aee4ae418bc0cf75ed Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 17 三月 2023 13:22:05 +0800 Subject: [PATCH] 优化异常处理以及级联设备状态查询 --- src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java index 2ef3323..2f9921c 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.conf; +import org.junit.jupiter.api.Order; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableAsync; @@ -7,7 +8,12 @@ import java.util.concurrent.ThreadPoolExecutor; +/** + * ThreadPoolTask 閰嶇疆绫� + * @author lin + */ @Configuration +@Order(1) @EnableAsync(proxyTargetClass = true) public class ThreadPoolTaskConfig { @@ -31,15 +37,20 @@ * 鍏佽绾跨▼绌洪棽鏃堕棿锛堝崟浣嶏細榛樿涓虹锛� */ private static final int keepAliveTime = 30; + /** * 缂撳啿闃熷垪澶у皬 */ - private static final int queueCapacity = 500; + private static final int queueCapacity = 10000; /** * 绾跨▼姹犲悕鍓嶇紑 */ - private static final String threadNamePrefix = "wvp-sip-handle-"; + private static final String threadNamePrefix = "wvp-"; + /** + * + * @return + */ @Bean("taskExecutor") // bean鐨勫悕绉帮紝榛樿涓洪瀛楁瘝灏忓啓鐨勬柟娉曞悕 public ThreadPoolTaskExecutor taskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); -- Gitblit v1.8.0