0Pricing
Flask Academy · Lesson

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

  1. Why Move Work Off the Request
  2. Wire Celery into the App Factory
  3. Define and Call a Task
  4. Track Results and Handle Failures
← Back to Flask Academy