Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
b0721403
Commit
b0721403
authored
May 18, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #201 from lepdou/adminservice_healthcheck
bugfix 当admin server health check 失败的时候日志打印优化
parents
d646bc5f
2554359a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
PortalSettings.java
...src/main/java/com/ctrip/apollo/portal/PortalSettings.java
+9
-4
application.pid
application.pid
+2
-0
No files found.
apollo-portal/src/main/java/com/ctrip/apollo/portal/PortalSettings.java
View file @
b0721403
...
...
@@ -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
);
}
}
}
}
...
...
application.pid
0 → 100644
View file @
b0721403
7804
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment