汪菘 1 year ago
parent
commit
a907c7343e
  1. 12
      acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java
  2. 6
      acs/nladmin-system/src/main/resources/config/application-dev.yml
  3. 9
      acs/nladmin-system/src/main/resources/config/application-prod.yml

12
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()) { if (log.isWarnEnabled()) {
log.warn("{} 所有内容都为空, all_null:{} ,暂定{}s", tag, all_null, 5000 + random); log.warn("{} 所有内容都为空, all_null:{} ,暂定{}s", tag, all_null, 5000 + random);
} }
ThreadUtl.sleep((long) ((new Random()).nextInt(3) + 1) * 1000);
ThreadUtl.sleep((long) (5000 + random)); break start;
} else if (this.all_null < 6) { } else if (this.all_null < 6) {
if (log.isWarnEnabled()) { if (log.isWarnEnabled()) {
log.warn(tag + "重新创建server"); log.warn(tag + "重新创建server");
@ -233,15 +233,15 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
if (log.isWarnEnabled()) { if (log.isWarnEnabled()) {
// log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, '\uea60' + random); // 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 { } else {
if (log.isWarnEnabled()) { if (log.isWarnEnabled()) {
// log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, 120000 + random); // log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, 120000 + random);
} }
// ThreadUtl.sleep((long) ((new Random()).nextInt(3) + 1) * 1000);
ThreadUtl.sleep((long) (120000 + random)); // break start;
} }
++this.all_null; ++this.all_null;
} else { } else {

6
acs/nladmin-system/src/main/resources/config/application-dev.yml

@ -6,8 +6,8 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy 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: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: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} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:123456}
# 初始连接数 # 初始连接数
@ -127,7 +127,7 @@ file:
avatarMaxSize: 5 avatarMaxSize: 5
logging: logging:
file: file:
path: C:\log\wms path: C:\log\ACS
config: classpath:logback-spring.xml config: classpath:logback-spring.xml
lucene: lucene:
index: index:

9
acs/nladmin-system/src/main/resources/config/application-prod.yml

@ -6,7 +6,8 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy 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} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:123456}
# 初始连接数 # 初始连接数
@ -52,7 +53,7 @@ spring:
multi-statement-allow: true multi-statement-allow: true
redis: redis:
#数据库索引 #数据库索引
database: ${REDIS_DB:2} database: ${REDIS_DB:15}
host: ${REDIS_HOST:127.0.0.1} host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PWD:} password: ${REDIS_PWD:}
@ -126,7 +127,7 @@ file:
avatarMaxSize: 5 avatarMaxSize: 5
logging: logging:
file: file:
path: D:\log\acs path: C:\log\ACS
config: classpath:logback-spring.xml config: classpath:logback-spring.xml
lucene: lucene:
index: index:
@ -153,5 +154,5 @@ sa-token:
token-prefix: Bearer token-prefix: Bearer
loki: loki:
url: http://192.168.4.210:3100/loki/api/v1 url: http://localhost:3100/loki/api/v1
systemName: acs systemName: acs

Loading…
Cancel
Save