提交 3b134890 编写于 作者: minghao.wu's avatar minghao.wu

log: 增加日志

上级 ecaae42d
流水线 #37945 已取消 于阶段
...@@ -103,13 +103,14 @@ public class TokenServiceImpl implements TokenService { ...@@ -103,13 +103,14 @@ public class TokenServiceImpl implements TokenService {
try { try {
Date lastLoginTime = new Date(timestamp); Date lastLoginTime = new Date(timestamp);
for (Integer fromDoctorId = 0; fromDoctorId < 1000412091; fromDoctorId += 10000) { for (Integer fromDoctorId = 0; fromDoctorId < 1000412091; fromDoctorId += 10000) {
logger.info("start remove token: {}", fromDoctorId);
List<Integer> doctorIdList = doctorMapper.selectIdByParams(fromDoctorId, fromDoctorId + 10000, lastLoginTime); List<Integer> doctorIdList = doctorMapper.selectIdByParams(fromDoctorId, fromDoctorId + 10000, lastLoginTime);
if (CollectionUtils.isEmpty(doctorIdList)) { if (CollectionUtils.isEmpty(doctorIdList)) {
Thread.sleep(2000); Thread.sleep(2000);
continue; continue;
} }
removeTokenByDoctorIdList(doctorIdList); removeTokenByDoctorIdList(doctorIdList);
logger.info("remove token: {} {}", fromDoctorId, doctorIdList.size()); logger.info("remove token done: {} {}", fromDoctorId, doctorIdList.size());
} }
} catch (Exception ex) { } catch (Exception ex) {
// ingnore // ingnore
...@@ -124,7 +125,9 @@ public class TokenServiceImpl implements TokenService { ...@@ -124,7 +125,9 @@ public class TokenServiceImpl implements TokenService {
String key3 = redisClient.get(key1); String key3 = redisClient.get(key1);
redisClient.del(key1); redisClient.del(key1);
redisClient.del(key2); redisClient.del(key2);
if (!StringUtils.isEmpty(key3)) {
redisClient.del(key3); redisClient.del(key3);
}
Thread.sleep(10); Thread.sleep(10);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册