[Django]-Looping background process with django

2👍

In case you feel that Celery is a bit oversized for your needs you could also define a custom management command that lives forever and waits for your incoming packet.

👤Jay

1👍

I suggest you to use Celery which works with Django and has support for long running tasks among other features.

http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

http://docs.celeryproject.org/en/latest/getting-started/introduction.html

0👍

https://github.com/lukedupin/django_posix_spawn

Using management commands in conjunction with this allows you to run django tasks that don’t block your website.

0👍

If you need a loop that is "django-aware" and already using celery for async tasks then
celery-eternal might be a good fit. Only caveat is that you must use redis as the celery results backend.

Leave a comment