rev 更新设备同步默认最大线程数,按照PLC ip数配置线程数

This commit is contained in:
USER-20220102CG\noblelift
2024-07-13 11:19:48 +08:00
parent b43a390a6f
commit 2e3bbf7bbb

View File

@@ -31,8 +31,8 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
ExecutorService executorService = ThreadPoolBuilder.newBuilder()
.threadPoolName("deviceOpc_thread")
.threadFactory("deviceOpc_thread")
.corePoolSize(2)
.maximumPoolSize(7)
.corePoolSize(80)
.maximumPoolSize(100)
.keepAliveTime(40)
.timeUnit(TimeUnit.SECONDS)
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)
@@ -56,6 +56,7 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
@Override
public void autoRun() throws Exception {
{
//Thread.sleep(10000L);
isRun = true;
Map<String, OpcServerManageDto> servers = this.opcServerManageService.queryAllServerMap();
@@ -98,8 +99,8 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
this.executorService = ThreadPoolBuilder.newBuilder()
.threadPoolName("deviceOpc_thread")
.threadFactory("deviceOpc_thread")
.corePoolSize(2)
.maximumPoolSize(7)
.corePoolSize(80)
.maximumPoolSize(100)
.keepAliveTime(40)
.timeUnit(TimeUnit.SECONDS)
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)