|
|
|
@ -1,13 +1,25 @@
|
|
|
|
|
package com.supervision.thread;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
|
|
|
import jakarta.annotation.PostConstruct;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 笔录分类线程池
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class RecordSplitTypeThreadPool {
|
|
|
|
|
@Value("${fu-hsi-config.thread-pool.type.core:2}")
|
|
|
|
|
private int core;
|
|
|
|
|
|
|
|
|
|
public static final ExecutorService recordSplitTypeExecutor = ThreadUtil.newFixedExecutor(5, Integer.MAX_VALUE, "recordSplitType", false);
|
|
|
|
|
public static ExecutorService recordSplitTypeExecutor;
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
public void init() {
|
|
|
|
|
log.info("RecordSplitType线程池初始化。线程数:{}", core);
|
|
|
|
|
recordSplitTypeExecutor = ThreadUtil.newFixedExecutor(core, Integer.MAX_VALUE, "recordSplitType", false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|