处理CheckExceptionDataJob异常判断

dev
lisai17@sina.com 2021-05-21 23:07:10 +08:00
parent 86ac3c6f0f
commit 3bd78b9ae8
1 changed files with 10 additions and 6 deletions

View File

@ -28,6 +28,7 @@ public class CheckExceptionDataJob implements Job {
for (Map.Entry<Integer, Record> entry : SvrCacheData.SUP_HEARTBEAT.entrySet()) { for (Map.Entry<Integer, Record> entry : SvrCacheData.SUP_HEARTBEAT.entrySet()) {
Record c = entry.getValue(); Record c = entry.getValue();
if (c.get("tm") != null) {
long st = c.getLong("tm"); long st = c.getLong("tm");
// 五分钟以内的才进行判断超过5分钟的就认为是离线了 // 五分钟以内的才进行判断超过5分钟的就认为是离线了
@ -35,6 +36,9 @@ public class CheckExceptionDataJob implements Job {
if (nowst - st < Const.SUP_OFFLINE_TIME) { if (nowst - st < Const.SUP_OFFLINE_TIME) {
onlineids.add(entry.getKey().toString()); onlineids.add(entry.getKey().toString());
} }
} else {
onlineids.add(entry.getKey().toString());
}
} }
int cnt = Db.queryInt("select count(t.sn) cnt from order_temp t\n" + int cnt = Db.queryInt("select count(t.sn) cnt from order_temp t\n" +