diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/HBCheckTask.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/HBCheckTask.java index 98448324..db8353aa 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/HBCheckTask.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/HBCheckTask.java @@ -4,8 +4,8 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.util.Calendar; -import java.util.List; import java.util.Map; +import java.util.Set; import static com.xhpc.common.data.redis.StaticBeanUtil.REDIS; import static com.xhpc.common.dto.ConnectorStatusInfo.OFF_LINE; @@ -19,9 +19,9 @@ public class HBCheckTask { protected void run() { String svcSrvKey = "svcSrvGuns:".concat(getLocalIPAndPort()); - List cacheGunkeyList = REDIS.getCacheList(svcSrvKey); + Set cacheGunkeySet = REDIS.getCacheSet(svcSrvKey); Long now = Calendar.getInstance().getTimeInMillis(); - for (String gunkey : cacheGunkeyList) { + for (String gunkey : cacheGunkeySet) { Map cacheGun = REDIS.getCacheMap(gunkey); Long hbtime = (Long) cacheGun.get("hbtime"); hbtime = hbtime == null ? 0 : hbtime;