@long_callback with Celery & Redis - how to get the example app work?

As I suspected, a separate process for the Celery worker is needed. In fact, two processes - one for the worker and another one for something called beat.

How to run the example app:

1) Start the redis server

Either with docker:

$ docker run -p 6379:6379 redis

Or without docker:

$ redis-server

2) Start Celery beat and worker processes

(two separate processes in separate terminal windows):

$ celery -A playground.celery_app beat --loglevel=INFO

and

$ celery -A playground.celery_app worker --loglevel=INFO

3) Start the Dash app

$ python playground.py

edit:

The beat process from point 2) is not necessary as @amarv pointed out.

2 Likes