Skip to content

Commit

Permalink
adding init script to ANOTHER script
Browse files Browse the repository at this point in the history
  • Loading branch information
ben851 committed Oct 11, 2023
1 parent 3b26ffd commit 5533bae
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/run_celery_send_sms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@

# runs celery with only the send-sms-* queues

init()
{
# Wait for cwagent to become available.
while :
do
if nc -vz $STATSD_HOST 25888; then
echo "CWAgent is Ready."
break;
else
echo "Waiting for CWAgent to become ready."
sleep 1
fi
done
}

set -e

if [[ -z "${STATSD_HOST}" ]]; then
init
fi

echo "Start celery, concurrency: ${CELERY_CONCURRENCY-4}"

# TODO: we shouldn't be using the send-sms-tasks queue anymore - once we verify this we can remove it
Expand Down

0 comments on commit 5533bae

Please sign in to comment.