mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
24 lines
489 B
Bash
Executable File
24 lines
489 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Wait for Temporal to be ready
|
|
SECONDS=0
|
|
TIMEOUT=180
|
|
|
|
# Check Temporal by just checking that the port is open
|
|
while true; do
|
|
if nc -z localhost 7233; then
|
|
echo "Temporal is up!"
|
|
exit 0
|
|
fi
|
|
|
|
if [ $SECONDS -ge $TIMEOUT ]; then
|
|
echo "Timed out ($TIMEOUT sec) waiting for Temporal to be ready. Crossing fingers and trying to run tests anyway."
|
|
exit 0
|
|
fi
|
|
|
|
echo "Waiting for Temporal to be ready"
|
|
sleep 1
|
|
done
|