mirror of
https://github.com/mozilla/fxa.git
synced 2025-12-13 20:36:41 +01:00
Because: * Mac M1 and M2 machines are slower to start up infrastructure like Redis and Firestore (which runs under emulation). This commit: * Doubles the RETRY period from 120 to 240s as most of the time, the __heartbeat__ response for fxa-auth-server and firestore processes responded between 140 - 190s. Closes #No ticket
19 lines
406 B
Bash
Executable File
19 lines
406 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
echo "Checking for response from: $1"
|
|
|
|
|
|
RETRY=240
|
|
for i in $(eval echo "{1..$RETRY}"); do
|
|
if [ "$(curl -s -o /dev/null --silent -w "%{http_code}" http://$1)" == "${2:-200}" ]; then
|
|
echo "$1 responded in $SECONDS seconds"
|
|
exit 0
|
|
else
|
|
if [ "$i" -lt $RETRY ]; then
|
|
sleep 1
|
|
fi
|
|
fi
|
|
done
|
|
echo "Giving up after $SECONDS seconds. Failed to get response from: $1"
|
|
exit 1
|