Skip to content

Commit c4d4229

Browse files
Update start in local flower
Flower needs to start only after the celery workers come online. otherwise one will see errors like `inspect method failed` etc
1 parent 44c94a2 commit c4d4229

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • {{cookiecutter.project_slug}}/compose/local/django/celery/flower

{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
set -o errexit
44
set -o nounset
55

6+
7+
until timeout 10 celery -A config.celery_app inspect ping; do
8+
>&2 echo "Celery workers not available"
9+
done
10+
11+
echo 'Starting flower'
12+
13+
614
exec watchfiles --filter python celery.__main__.main \
715
--args \
816
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""

0 commit comments

Comments
 (0)