Spaces:
Sleeping
Sleeping
Update run.sh
Browse files
run.sh
CHANGED
@@ -6,7 +6,7 @@ counter1=0
|
|
6 |
|
7 |
# Continuous loop for reliably checking cog server's readiness on port 5000
|
8 |
while true; do
|
9 |
-
if nc -z localhost
|
10 |
echo "Cog server is running on port 5000."
|
11 |
break # Exit the loop when the server is up
|
12 |
fi
|
@@ -24,7 +24,7 @@ counter2=0
|
|
24 |
|
25 |
# New check: Waiting for the cog server to be fully ready
|
26 |
while true; do
|
27 |
-
response=$(curl -s http://localhost:
|
28 |
status=$(echo $response | jq -r '.status') # Parse status from JSON response
|
29 |
if [ "$status" = "READY" ]; then
|
30 |
echo "Cog server is fully ready."
|
|
|
6 |
|
7 |
# Continuous loop for reliably checking cog server's readiness on port 5000
|
8 |
while true; do
|
9 |
+
if nc -z localhost 5000; then
|
10 |
echo "Cog server is running on port 5000."
|
11 |
break # Exit the loop when the server is up
|
12 |
fi
|
|
|
24 |
|
25 |
# New check: Waiting for the cog server to be fully ready
|
26 |
while true; do
|
27 |
+
response=$(curl -s http://localhost:5000/health-check) # Replace localhost:5000 with actual hostname and port if necessary
|
28 |
status=$(echo $response | jq -r '.status') # Parse status from JSON response
|
29 |
if [ "$status" = "READY" ]; then
|
30 |
echo "Cog server is fully ready."
|