mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-26 16:30:39 +03:00
Update start-flower in flower to wait until all celery workers are online (#5012)
Flower needs to start only after the celery workers come online. Otherwise one will see errors like `inspect method failed` etc
This commit is contained in:
parent
c3335e6604
commit
401ffd0e86
|
@ -3,6 +3,14 @@
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
|
||||||
|
until timeout 10 celery -A config.celery_app inspect ping; do
|
||||||
|
>&2 echo "Celery workers not available"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo 'Starting flower'
|
||||||
|
|
||||||
|
|
||||||
exec watchfiles --filter python celery.__main__.main \
|
exec watchfiles --filter python celery.__main__.main \
|
||||||
--args \
|
--args \
|
||||||
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""
|
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""
|
||||||
|
|
|
@ -4,6 +4,14 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
until timeout 10 celery -A config.celery_app inspect ping; do
|
||||||
|
>&2 echo "Celery workers not available"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo 'Starting flower'
|
||||||
|
|
||||||
|
|
||||||
exec celery \
|
exec celery \
|
||||||
-A config.celery_app \
|
-A config.celery_app \
|
||||||
-b "${CELERY_BROKER_URL}" \
|
-b "${CELERY_BROKER_URL}" \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user