0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/bin/check_temporal_up

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