Wire Celery into the App Factory
Configure a broker and the Celery app.
Three Pieces to Wire
To run Celery you need three things: the broker URL, a result backend, and a Celery app object your tasks belong to.
Pick a Broker
Redis is the easiest broker to start with. You point Celery at it with a URL so it knows where to push and pull jobs.
broker_url = "redis://localhost:6379/0"All lessons in this course
- Why Move Work Off the Request
- Wire Celery into the App Factory
- Define and Call a Task
- Track Results and Handle Failures