Home > Mobile >  How to run background task with Django?
How to run background task with Django?

Time:07-21

I'm looking to run heavy tasks (more than 5 minutes) in the background with django.

When a heavy task is launched, django stops responding and it becomes impossible for users to navigate between pages until the task is finished.

For me a solution would be to run these heavy tasks in the background or in parallel in order to allow the user to be able to navigate between the pages in the meantime. Do you know how I can do this ?

CodePudding user response:

celery is the typical way of doing this and has direct support for Django.

Here are the docs to get started with celery in Django: https://docs.celeryq.dev/en/latest/django/first-steps-with-django.html

CodePudding user response:

For heavy background tasks, I think the most efficient way would be using Celery.

  • Related