Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Creating Asynchronous Tasks With Celery and Django (Overview)

You’ve built a shiny Django app and want to release it to the public, but you’re worried about time-intensive tasks that are part of your app’s workflow. You don’t want your users to have a negative experience navigating your app. You can integrate Celery to help with that.

Celery is a distributed task queue for UNIX systems. It allows you to offload work from your Python app. Once you integrate Celery into your app, you can send time-intensive tasks to Celery’s task queue. That way, your web app can continue to respond quickly to users while Celery completes expensive operations asynchronously in the background.

In this video course, you’ll learn how to:

  • Recognize effective use cases for Celery
  • Differentiate between Celery beat and Celery workers
  • Integrate Celery and Redis in a Django project
  • Set up asynchronous tasks that run independently of your Django app
  • Refactor Django code to run a task with Celery instead
Download

Sample Code (.zip)

24.2 KB
Download

Course Slides (.pdf)

6.1 MB

00:00 Creating asynchronous tasks with Celery and Django. You’ve built a shiny Django app and want to release it to the public, but you are worried about time-intensive tasks that are part of the app’s workflow.

00:12 If you do not want your users to have a negative experience while navigating the app, you can use Celery to help with that problem.

00:19 Celery is a distributed task queue for UNIX Systems. It allows you to offload work from your Python app. Once you integrate it into your app, you can send time-intensive tasks to Celery’s task queue.

00:32 That way, the web app can continue to respond quickly to users while Celery completes expensive operations asynchronously in the background.

00:40 In this course, you’ll learn how to recognize effective use cases for Celery, differentiate between Celery beat and Celery workers. Integrate Celery and Redis into a Django project, set up asynchronous tasks that run independently of your Django app, and refactor Django code to run a task with Celery instead. If you’ve never used Celery in a Django app before, or you’ve peeked into Celery’s documentation but couldn’t find your way around, then you are in the right place.

01:09 You’ll learn all you need to start running asynchronous tasks with Django and Celery. You’ll be integrating Celery into an existing Django app. So download the course materials to jumpstart that process with the initial version of the app that you’ll be working from.

01:25 While the concepts and codes seen in this course will work on older versions of Python, Django, Redis, and Celery, the versions used in this course are seen on screen and have been pinned where appropriate on the installation commands.

01:40 Now you know what’s going to be covered. Let’s get started.

Become a Member to join the conversation.