unknowntpo commented on code in PR #56:
URL: 
https://github.com/apache/gravitino-playground/pull/56#discussion_r1764595136


##########
healthcheck/gravitino-healthcheck.sh:
##########
@@ -23,22 +23,24 @@ max_attempts=3
 attempt=0
 success=false
 
+HOST_IP=${GRAVITINO_HOST_IP:-127.0.0.1}
+
 while [ $attempt -lt $max_attempts ]; do
-  response=$(curl -X GET -H "Content-Type: application/json" 
http://127.0.0.1:8090/api/version)
-  
-  if echo "$response" | grep -q "\"code\":0"; then
-    success=true
-    break
-  else
-    echo "Attempt $((attempt + 1)) failed..."
-    sleep 1
-  fi
-  
-  ((attempt++))
+       response=$(curl -X GET -H "Content-Type: application/json" 
http://${HOST_IP}:8090/api/version)
+
+       if echo "$response" | grep -q "\"code\":0"; then
+               success=true
+               break
+       else
+               echo "Attempt $((attempt + 1)) failed..."
+               sleep 1
+       fi
+

Review Comment:
   Done.
   
   > gravitino-playground project doesn't have a shell script style check?
   
   No, we don't have style check for shell script for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to