Commit b0721403 by lepdou

Merge pull request #201 from lepdou/adminservice_healthcheck

bugfix 当admin server health check 失败的时候日志打印优化
parents d646bc5f 2554359a
......@@ -129,12 +129,17 @@ public class PortalSettings {
long failCnt = healthCheckFailCnt.get(env);
healthCheckFailCnt.put(env, ++failCnt);
if (envStatusMark.get(env) && failCnt >= ENV_DIED_THREADHOLD){
envStatusMark.put(env, false);
logger.error("env turn to down [env:{}]", env);
}else {
if (!envStatusMark.get(env)) {
logger.warn("[env:{}] down yet.", env);
} else {
if (failCnt >= ENV_DIED_THREADHOLD) {
envStatusMark.put(env, false);
logger.error("env turn to down [env:{}]", env);
} else {
logger.warn("env health check fail first time. [env:{}]", env);
}
}
}
}
......
7804
\ No newline at end of file
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