An async Django email backend using celery
Project description
TODO
- Enviar todas as mensagens que levantem TemplateDoesNotExist para uma fila apropriada
django-async-email
EMAILS_TEMPLATES = {
"welcome": {
"subject": "welcome/subject.txt",
"body_html": "welcome/body.html",
"body_txt": "welcome/body.txt",
}
}
# Customize the max_retries for one specific email category task
ASYNC_EMAIL_TASKS = {"async_email.tasks.welcome": {"max_retries": 20}}
# Customize the max_retries for all the tasks
# Default is 20
ASYNC_EMAIL_TASKS_MAX_RETRIES = 10
ASYNC_EMAIL_TASKS_MAX_RETRIES = 10
Important notes
python setup.py sdist bdist_wheel && pip uninstall -y django_async_email && python -m pip install dist/django_async_email-0.1.0-py2.py3-none-any.whl
Demo project
cd demo_project
# Build and run the docker image
docker-compose build && docker-compose up -d demo_project
# Run migrations
docker-compose exec demo_project python manage.py migrate
# Create the superuser
docker-compose exec demo_project python manage.py createsuperuser
celery worker --app=demo_project.celery -l info --pool=eventlet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-async-email-0.1.2.tar.gz
(22.1 kB
view hashes)
Built Distribution
Close
Hashes for django_async_email-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e97783c954417e7907d1b2006481e7240612991c9783c72b9c1afe7cd5ff7685 |
|
MD5 | a989e06b4cc09d167abc19a1c808415a |
|
BLAKE2b-256 | f78f984a02da199e7de555abf94801034d740a072db25d2bdd9ac9bfc3ac9c3b |