Commit ea58ee22 by wangxinzhe

修改健康检查的判定

1 parent 0b9bc6dc
...@@ -37,7 +37,7 @@ while true; do ...@@ -37,7 +37,7 @@ while true; do
HTTP_RESPONSE=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 5 --max-time 10 "$APP_HEALTH_URL" 2>> "$LOG_FILE") HTTP_RESPONSE=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 5 --max-time 10 "$APP_HEALTH_URL" 2>> "$LOG_FILE")
CURL_EXIT_CODE=$? CURL_EXIT_CODE=$?
if [ $CURL_EXIT_CODE -eq 0 ] && [ "$HTTP_RESPONSE" -eq 200 ]; then if [ $CURL_EXIT_CODE -eq 0 ] && ([ "$HTTP_RESPONSE" -eq 200 ] || [ "$HTTP_RESPONSE" -eq 404 ] || [ "$HTTP_RESPONSE" -eq 401 ]); then
# 健康检查成功,重置失败计数器 # 健康检查成功,重置失败计数器
if [ $failure_count -gt 0 ]; then if [ $failure_count -gt 0 ]; then
log "Health restored after $failure_count failures. Resetting counter." log "Health restored after $failure_count failures. Resetting counter."
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!