Skip to Content
Mastering Flask Web Development - Second Edition
book

Mastering Flask Web Development - Second Edition

by Daniel Gaspar, Jack Stouffer
October 2018
Intermediate to advanced
332 pages
8h 9m
English
Packt Publishing
Content preview from Mastering Flask Web Development - Second Edition

Using Celery on Heroku

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
To get the full list of Heroku add-ons, go to https://elements.heroku.com/addons.

At the same location on the dashboard where Heroku Postgres was listed, you will now find CloudAMQP:

Clicking on CloudAMQP will also give ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg
Flask Web Development

Flask Web Development

Miguel Grinberg

Publisher Resources

ISBN: 9781788995405Supplemental Content