diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start index b4783d2f0d..cebb62203a 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start @@ -3,6 +3,14 @@ set -o errexit 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 \ --args \ "-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\"" diff --git a/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start index 4180d6778d..f903a05a26 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/celery/flower/start @@ -4,6 +4,14 @@ set -o errexit 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 \ -A config.celery_app \ -b "${CELERY_BROKER_URL}" \