Browse Source

Espera até que Solr esteja pronto para requests

pull/2439/head
Edward 6 years ago
committed by GitHub
parent
commit
53ce5bc517
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      check_solr.sh

14
check_solr.sh

@ -0,0 +1,14 @@
#!/bin/bash
echo "Waiting for solr connection at $SOLR_URL ..."
while true; do
echo "$SOLR_URL/solr/admin/collections?action=LIST"
RESULT=$(curl -s -o /dev/null -I "$SOLR_URL/solr/admin/collections?action=LIST" -w '%{http_code}')
echo $RESULT
if [ "$RESULT" -eq '200' ]; then
echo "Solr server is up!"
break
else
sleep 3
fi
done
Loading…
Cancel
Save