更新 MonitorService.java
parent
4e4084e15d
commit
2bd7e21741
|
|
@ -58,8 +58,8 @@ public class MonitorService {
|
||||||
long timeDifferenceMillis = currentTimeMillis - device.getLastOnlineTime();
|
long timeDifferenceMillis = currentTimeMillis - device.getLastOnlineTime();
|
||||||
long timeDifferenceSeconds = timeDifferenceMillis / 1000;
|
long timeDifferenceSeconds = timeDifferenceMillis / 1000;
|
||||||
if (timeDifferenceSeconds > device.getTimeOutPeriod()) {
|
if (timeDifferenceSeconds > device.getTimeOutPeriod()) {
|
||||||
logger.info("currentTimeMillis: {},device LastOnlineTime: {},时间差: {},设备超时时间: {}",currentTimeMillis,
|
logger.info("Device offline. SN: {}, LastOnlineTime: {}, TimeDifference: {}, TimeoutPeriod: {}",
|
||||||
device.getLastOnlineTime(),timeDifferenceSeconds,device.getTimeOutPeriod());
|
device.getSN(), device.getLastOnlineTime(), timeDifferenceSeconds, device.getTimeOutPeriod());
|
||||||
updateStatus(device, 0); // 设备离线
|
updateStatus(device, 0); // 设备离线
|
||||||
logger.info("Update the device status to offline.");
|
logger.info("Update the device status to offline.");
|
||||||
sendNotification(device);
|
sendNotification(device);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue