0PricingLogin
Django Academy · Lesson

Why You Need Background Tasks

Keep requests fast by deferring slow work.

The Slow Request Problem

Some work is slow: sending email, resizing images, calling other APIs. If a view does it inline, the user just stares at a spinner. 🐢

Requests Should Be Fast

A good web request returns in milliseconds. Anything that takes seconds blocks the browser and ties up a Django worker that could serve someone else.

All lessons in this course

  1. Why You Need Background Tasks
  2. Setting Up Celery with a Broker
  3. Writing and Calling @shared_task
  4. Scheduled Jobs with Celery Beat
← Back to Django Academy