Fedora Project

Create a sample async task for a django application

Utilize celery in conjunction with Redis in a Django application to create your first sample asynchronous task.

Overview Asynchronous programming is a form of parallel programming that allows a unit of work to run separately from the primary application thread. When the work is complete, it notifies the main thread (as well as whether the work was completed or failed). There are numerous benefits to using it, such as improved application performance and enhanced responsiveness. Celery is a Python based task queuing software package that enables execution of asynchronous computational workloads driven by information contained in messages that are produced in application code destined for a Celery task queue. Celery is best used in conjunction with a storage solution that is often referred to as a message broker. A common message broker that is used with celery is Redis which is a performant, in memory, key-value data store.

Task Details Create a simple additive tasks, that takes two numbers and returns their sum. The task should run asynchronously.

Resources You can make use of the following resources to complete the task: Asynchronous Tasks in Django with Redis and Celery[https://stackabuse.com/asynchronous-tasks-in-django-with-redis-and-celery/]

Deliverables Please submit a link to the repository (hosted either on GitHub or Pagure) with proper documentation in the README.

Task tags

  • python
  • celery
  • redis
  • django

Students who completed this task

VishalBala, paraxor, geek123, Mandarin Pine

Task type

  • code Code
close

2019