|
@ -18,7 +18,7 @@ import java.util.*;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Task - 定时检查集群状态,提高解析任务容错率
|
|
|
* Task - 定时更新在线用户状态
|
|
|
* Created by progr1mmer on 2017/12/15.
|
|
|
*/
|
|
|
@Component
|
|
@ -34,10 +34,13 @@ public class ActivatedUserUpdateTask {
|
|
|
List<String> keys = new ArrayList<>();
|
|
|
String pattern = "healthyHouse:*:activated";
|
|
|
Set<String> keys1 = redisClient.keys(pattern);
|
|
|
List<Serializable> ids = redisClient.multiGet(keys1);
|
|
|
|
|
|
try {
|
|
|
if (ids!=null && ids.size()>0) {
|
|
|
userService.updateUserOffLine(ids);
|
|
|
if (keys1 !=null && keys1.size()>0){
|
|
|
List<Serializable> ids = redisClient.multiGet(keys1);
|
|
|
if (ids!=null && ids.size()>0) {
|
|
|
userService.updateUserOffLine(ids);
|
|
|
}
|
|
|
}
|
|
|
} catch (ManageException e) {
|
|
|
e.printStackTrace();
|