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
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.1.tar.gz
(22.0 kB
view hashes)
Built Distribution
Close
Hashes for django_async_email-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e2883cbe26b70b79bd53069f8551f40ed64893670b5a3cd1f654977c85a0f00 |
|
MD5 | 456a6c05c9c15b9bfdb798196de997d4 |
|
BLAKE2b-256 | 67502e170c3338fc12ca77f3ad23c64dd75681e92db67807e1715ab65983d711 |