如果某个设备数据落库失败,不影响其他设备数据落库
This commit is contained in:
parent
77781a8ef9
commit
dcdf3e7a02
|
@ -72,6 +72,7 @@ public class Redis2DBPersistenceService {
|
||||||
if (Objects.isNull(deviceId)) {
|
if (Objects.isNull(deviceId)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
if (Objects.nonNull(idGatewayMappingMap)) {
|
if (Objects.nonNull(idGatewayMappingMap)) {
|
||||||
operations.put(PersistenceHandler.DEVICE_DATA_CACHE + deviceId,
|
operations.put(PersistenceHandler.DEVICE_DATA_CACHE + deviceId,
|
||||||
"online", String.valueOf(idGatewayMappingMap.containsKey(deviceId)));
|
"online", String.valueOf(idGatewayMappingMap.containsKey(deviceId)));
|
||||||
|
@ -112,6 +113,9 @@ public class Redis2DBPersistenceService {
|
||||||
log.error("推设备最新落库数据到MQ失败({}): {}", queueName, rowDataJson, e);
|
log.error("推设备最新落库数据到MQ失败({}): {}", queueName, rowDataJson, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("设备{}最新数据落库失败", deviceId, JSONUtil.toJsonStr(deviceMap), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue