Skip to content

Commit

Permalink
fixes issue with in cluster run; dashboard will wait for the first re…
Browse files Browse the repository at this point in the history
…port to be generated before starting. (#241)
  • Loading branch information
marcinc authored Jun 17, 2022
1 parent 0a4abfe commit 576d352
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/in-cluster-run
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
: ${KRANE_REPORT_OUTPUT:=none}

echo "Verify RedisGraph is UP..."
while [[ "$((printf "PING\r\n";) | nc redisgraph 6379 -w 2 | awk '{$1=$1};1')" != "+PONG" ]];
while [[ "$((printf "PING\r\n";) | nc redisgraph 6379 -w 2 | awk '{$1=$1};1')" != "+PONG" ]];
do echo "* Waiting for redisgraph to become available" && sleep 2;
done
echo "Starting report loop..."
while true; do
bin/krane report --incluster -o ${KRANE_REPORT_OUTPUT}
echo "- sleeping ${KRANE_REPORT_INTERVAL} sec"
echo "- Sleeping ${KRANE_REPORT_INTERVAL} sec"
sleep ${KRANE_REPORT_INTERVAL}
done &
sleep 5
echo "Starting Krane dashboard..."
bin/krane dashboard
while ! nohup bin/krane dashboard; do
echo "- Waiting for Krane dashboard to become available"
sleep 5
done

0 comments on commit 576d352

Please sign in to comment.