supermario
supermario

Reputation: 2765

What scaleable way to send notification emails in django?

On a custom django app I'd like to send notification email on many events, e.g. when a user's comment is being liked or comment is posted on her profile. However I am worried that this will have scaling implications for the app so I am wondering what is the best way to do it so that it does not block the views.

Upvotes: 2

Views: 84

Answers (1)

Aaron Lelevier
Aaron Lelevier

Reputation: 20838

Use Django-Celery to put it in a Task Queue, that way it all happens in the background.

http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html

Here is a good video link on how to use Celery with Django:

https://godjango.com/63-deferred-tasks-and-scheduled-jobs-with-celery-31-django-17-and-redis/

Upvotes: 2

Related Questions