rev 更新设备同步默认最大线程数,按照PLC ip数配置线程数
This commit is contained in:
@@ -31,8 +31,8 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
|
|||||||
ExecutorService executorService = ThreadPoolBuilder.newBuilder()
|
ExecutorService executorService = ThreadPoolBuilder.newBuilder()
|
||||||
.threadPoolName("deviceOpc_thread")
|
.threadPoolName("deviceOpc_thread")
|
||||||
.threadFactory("deviceOpc_thread")
|
.threadFactory("deviceOpc_thread")
|
||||||
.corePoolSize(2)
|
.corePoolSize(80)
|
||||||
.maximumPoolSize(7)
|
.maximumPoolSize(100)
|
||||||
.keepAliveTime(40)
|
.keepAliveTime(40)
|
||||||
.timeUnit(TimeUnit.SECONDS)
|
.timeUnit(TimeUnit.SECONDS)
|
||||||
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)
|
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)
|
||||||
@@ -56,6 +56,7 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
|
|||||||
@Override
|
@Override
|
||||||
public void autoRun() throws Exception {
|
public void autoRun() throws Exception {
|
||||||
{
|
{
|
||||||
|
//Thread.sleep(10000L);
|
||||||
isRun = true;
|
isRun = true;
|
||||||
|
|
||||||
Map<String, OpcServerManageDto> servers = this.opcServerManageService.queryAllServerMap();
|
Map<String, OpcServerManageDto> servers = this.opcServerManageService.queryAllServerMap();
|
||||||
@@ -98,8 +99,8 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable {
|
|||||||
this.executorService = ThreadPoolBuilder.newBuilder()
|
this.executorService = ThreadPoolBuilder.newBuilder()
|
||||||
.threadPoolName("deviceOpc_thread")
|
.threadPoolName("deviceOpc_thread")
|
||||||
.threadFactory("deviceOpc_thread")
|
.threadFactory("deviceOpc_thread")
|
||||||
.corePoolSize(2)
|
.corePoolSize(80)
|
||||||
.maximumPoolSize(7)
|
.maximumPoolSize(100)
|
||||||
.keepAliveTime(40)
|
.keepAliveTime(40)
|
||||||
.timeUnit(TimeUnit.SECONDS)
|
.timeUnit(TimeUnit.SECONDS)
|
||||||
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)
|
.workQueue(MEMORY_SAFE_LINKED_BLOCKING_QUEUE.getName(), 2000)
|
||||||
|
|||||||
Reference in New Issue
Block a user