rev 更新设备同步默认最大线程数,按照PLC ip数配置线程数
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user