Django Celery Tutorial Series

Table of Contents

Please check my course: The Definitive Guide to Celery and Django on testdriven.io

Why I wrote this Django Celery Tutorial

The Celery official doc is a little complex, and not very friendly to newbie Django developers, which make many people complain.

So I decide to write tutorial series to help people learn Celery in a shorter time.

I would also share some practical tips that would help your development.

Why Django project need Celery

Celery can help run tasks on worker process instead of web process, so in web process we can return HTTP response back immediately (even the task in worker process is still running) to our user, the request cycle would not be blocked and user experience would be better.

Below are some cases Celery can help you

  • You built a comment app which supports mention operation, user can use @ to mention other user and they would receive email notifications. If one user mentions 10 people in one comment, the web process needs to process and send 10 emails. Sometimes this might be time-consuming (network, server and other factors), but Celery can let you send emails in background process, and you can return http response to user so he do not need to wait.

  • When user upload image to your web application, you need to generate thumbnail, you can do the task in worker process

  • You need to do some period job, for example, generate daily report, clear expired session data. You can let Celery help send task at the target time to the worker process.

When you build web application, you should try to make the response time of your web application lower than 500ms, if some response time is big, you should figure out the reason and try to solve it. Celery can help when solving this problem.

Table Of Content

Please check my course: The Definitive Guide to Celery and Django on testdriven.io

Launch Products Faster with Django

SaaS Hammer helps you launch products in faster way. It contains all the foundations you need so you can focus on your product.

Michael Yin

Michael is a Full Stack Developer from China who loves writing code, tutorials about Django, and modern frontend tech.

He has published some ebooks on leanpub and tech course on testdriven.io.

He is also the founder of the AccordBox which provides the web development services.

Django SaaS Template

It aims to save your time and money building your product

Learn More

Hotwire is the default frontend solution shipped in Rails, this book will teach you how to make it work with Django, you will learn building modern web applications without using much JavaScript.

Read More
© 2018 - 2024 AccordBox