October 2018
Intermediate to advanced
332 pages
8h 9m
English
We have our production web server and database set up, but we still need to set up Celery. Using one of Heroku's many plugins, we can host a RabbitMQ instance in the cloud, while running the Celery worker on the dyno. The first step is to tell Heroku to run your Celery worker in Procfile:
web: uwsgi heroku-uwsgi.ini celery: celery worker -A celery_runner
Next, to install the Heroku RabbitMQ plugin with the free plan (the lemur plan), use the following command:
$ heroku addons:create cloudamqp:lemur
At the same location on the dashboard where Heroku Postgres was listed, you will now find CloudAMQP:
Clicking on CloudAMQP will also give ...