Commit e2dd9f5b authored by 黎博's avatar 黎博

增加日志

parent 83cc40e0
......@@ -121,6 +121,7 @@ public class K8sService {
String NS_PREFIX = "k8s:namespace:";
Object redisValue = redisUtils.get(NS_PREFIX + env);
if (redisValue != null) {
log.info("从缓存获取到{}环境namespace列表:{}", env, redisValue);
return JSON.parseArray(redisValue.toString(), Map.class);
} else {
List<Map> resultList = new ArrayList<>();
......@@ -196,6 +197,7 @@ public class K8sService {
resultList.add(map);
}
}
log.info("获取{}环境namespace列表:{}", env, JSON.toJSONString(resultList));
// 设置缓存
redisUtils.set(NS_PREFIX + env, JSON.toJSONString(resultList), 1800);
return resultList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment