Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to run background task with Django?

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 ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading