M
M
mr_drinkens892017-10-27 14:13:03
Django
mr_drinkens89, 2017-10-27 14:13:03

How to add async to Django post_save signal?

Hello.
Multiuser web application, with Django on the backend (Django rest).
I use Centrifugo to push changes.
User A updates some model (say, Task). On the backend, I "listen" to the post_save signal from the Task model and send the changes to all TASK participants. But, the problem is that Django is synchronous, that is, until the mailing is done, the user will not see the answer. How can I also listen to post_save without blocking the response to the user?
Use celery or are there simpler, but correct solutions?
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Astrohas, 2017-10-27
@Astrohas

Well, Celery is more correct, but I usually advise django-background-tasks for simple tasks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question