调整心跳超时重新连接

This commit is contained in:
tiger_zhou 2023-12-15 15:17:51 +08:00
parent 3ea0d08ca6
commit 5ca3132c49
4 changed files with 28 additions and 7 deletions

View File

@ -24,7 +24,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>

View File

@ -102,10 +102,10 @@ public class SwitchLostAlertMonitoringTask2 implements AlertMonitoringTask {
boolean timeOver = this.timeOver(switchBuild.getReceiveTime(), guardConfig.getSwitchLostTimes());
String switchPutName = this.getDefaultName(AlertType.SWITCH_LOST, lineId, switchBuild.getRtuId());
if (saveIsLost && timeOver) {
log.info("道岔失表超时,准备报警 线路[{}] 设备[{}] 接受时间[{}] 发送时间[{}] 对应地图设备id[{}]"
, lineId, switchBuild.getId(), switchBuild.getReceiveTime(), switchBuild.getTimestamp(), turnout.getCommon().getId());
//失表超时
if (alertManager.putAlterDevice(lineId, switchPutName, switchBuild.getId())) {
log.info("道岔失表超时,准备报警 线路[{}] 设备[{}] 接受时间[{}] 发送时间[{}] 对应地图设备id[{}]"
, lineId, switchBuild.getId(), switchBuild.getReceiveTime(), switchBuild.getTimestamp(), turnout.getCommon().getId());
String alertMsg = String.format("设备[%s]失表", switchBuild.getId());
NccAlertInfo alertInfo = this.alertInfoService.createAlert2(Optional.empty(), AlertType.SWITCH_LOST, switchBuild, alertMsg, turnout.getCommon().getId(),
AlertDeviceType.DEVICE_TYPE_SWITCH, false);

View File

@ -1,5 +1,6 @@
server:
port: 9081
shutdown: "graceful"
spring:
profiles:
active: local
@ -46,10 +47,27 @@ jwt:
key:
pub: classpath:app.pub
prv: classpath:app.key
#过滤OCC 数据中的rtu
occ-not-handle-rtu: '{3: "81,82"}'
occ-not-handle:
lineId: 3
#过滤OCC 数据中的rtu
filterRtuIds:
- 81
- 82
#长时间没有接收occ数据超时重新获取基础数据时间小时
receive-msg-timeout: 1
#检测硬件变化(cpu,内存)
monitor-handware-change: true
#management:
# endpoints:
# web:
# exposure:
# include: '*'
# server:
# port: 9081
# endpoint:
# shutdown:
# enabled: true
# health:
# show-details: always

@ -1 +1 @@
Subproject commit 226023c351e10e7e07cc7c48e1dbde661091b6b5
Subproject commit ee5fb2079424cb1ac7a049ead18e0c50aa98606b