mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(chat) fix check llmParser health error if not install jq (#171)
This commit is contained in:
@@ -94,12 +94,13 @@ function runPythonService {
|
|||||||
for i in {1..10}
|
for i in {1..10}
|
||||||
do
|
do
|
||||||
echo "Performing health check attempt $i..."
|
echo "Performing health check attempt $i..."
|
||||||
response=$(curl -s http://${LLMPARSER_HOST}:${LLMPARSER_PORT}/health | jq -r '.status')
|
response=$(curl -s http://${LLMPARSER_HOST}:${LLMPARSER_PORT}/health)
|
||||||
if [ "$response" == "Healthy" ]; then
|
echo "health check response: $response"
|
||||||
|
status_ok="Healthy"
|
||||||
|
if [[ $response == *$status_ok* ]] ; then
|
||||||
echo "Health check passed."
|
echo "Health check passed."
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo "Health check failed with status: $response"
|
|
||||||
if [ "$i" -eq 10 ]; then
|
if [ "$i" -eq 10 ]; then
|
||||||
echo "Health check failed after 10 attempts. Exiting."
|
echo "Health check failed after 10 attempts. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user