From a907c7343eb1af37b80e02a2fad4c7c31ede284b Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Thu, 14 Sep 2023 10:56:16 +0800 Subject: [PATCH] rev --- .../org/nl/acs/opc/DeviceOpcProtocolRunable.java | 12 ++++++------ .../src/main/resources/config/application-dev.yml | 6 +++--- .../src/main/resources/config/application-prod.yml | 9 +++++---- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index 97a5e25..d299cba 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -220,8 +220,8 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC if (log.isWarnEnabled()) { log.warn("{} 所有内容都为空, all_null:{} ,暂定{}s", tag, all_null, 5000 + random); } - - ThreadUtl.sleep((long) (5000 + random)); + ThreadUtl.sleep((long) ((new Random()).nextInt(3) + 1) * 1000); + break start; } else if (this.all_null < 6) { if (log.isWarnEnabled()) { log.warn(tag + "重新创建server"); @@ -233,15 +233,15 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC if (log.isWarnEnabled()) { // log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, '\uea60' + random); } + ThreadUtl.sleep((long) ((new Random()).nextInt(3) + 1) * 1000); + break start; - ThreadUtl.sleep((long) ('\uea60' + random)); } else { if (log.isWarnEnabled()) { // log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, 120000 + random); } - - ThreadUtl.sleep((long) (120000 + random)); - +// ThreadUtl.sleep((long) ((new Random()).nextInt(3) + 1) * 1000); +// break start; } ++this.all_null; } else { diff --git a/acs/nladmin-system/src/main/resources/config/application-dev.yml b/acs/nladmin-system/src/main/resources/config/application-dev.yml index 0585c63..7bd7aa6 100644 --- a/acs/nladmin-system/src/main/resources/config/application-dev.yml +++ b/acs/nladmin-system/src/main/resources/config/application-dev.yml @@ -6,8 +6,8 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true -# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true +# url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 @@ -127,7 +127,7 @@ file: avatarMaxSize: 5 logging: file: - path: C:\log\wms + path: C:\log\ACS config: classpath:logback-spring.xml lucene: index: diff --git a/acs/nladmin-system/src/main/resources/config/application-prod.yml b/acs/nladmin-system/src/main/resources/config/application-prod.yml index fdcbec5..11e8128 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/acs/nladmin-system/src/main/resources/config/application-prod.yml @@ -6,7 +6,8 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.4.210}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + # url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 @@ -52,7 +53,7 @@ spring: multi-statement-allow: true redis: #数据库索引 - database: ${REDIS_DB:2} + database: ${REDIS_DB:15} host: ${REDIS_HOST:127.0.0.1} port: ${REDIS_PORT:6379} password: ${REDIS_PWD:} @@ -126,7 +127,7 @@ file: avatarMaxSize: 5 logging: file: - path: D:\log\acs + path: C:\log\ACS config: classpath:logback-spring.xml lucene: index: @@ -153,5 +154,5 @@ sa-token: token-prefix: Bearer loki: - url: http://192.168.4.210:3100/loki/api/v1 + url: http://localhost:3100/loki/api/v1 systemName: acs