链路心跳新增modbus和ftp状态
This commit is contained in:
parent
39f4d50fca
commit
d3d7937947
@ -46,11 +46,11 @@ public class HeartbeatCommand implements BaseCommand{
|
||||
for (JsonNode linkNode : links) {
|
||||
String linkId = linkNode.get("linkId").asText();
|
||||
boolean online = linkNode.get("online").asBoolean();
|
||||
JsonNode modbusNode = linkNode.get("modbus");
|
||||
if (modbusNode != null){
|
||||
boolean modbus = modbusNode.asBoolean();
|
||||
JsonNode realNode = linkNode.get("real");
|
||||
if (realNode != null){
|
||||
boolean real = realNode.asBoolean();
|
||||
String key = String.format("link:%s:modbus", linkId);
|
||||
ops.set(key, modbus, HEARTBEAT_TTL, TimeUnit.SECONDS);
|
||||
ops.set(key, real, HEARTBEAT_TTL, TimeUnit.SECONDS);
|
||||
}
|
||||
JsonNode ftpNode = linkNode.get("ftp");
|
||||
if (ftpNode != null){
|
||||
|
Loading…
Reference in New Issue
Block a user