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 details)
Built Distribution
File details
Details for the file django-async-email-0.1.2.tar.gz
.
File metadata
- Download URL: django-async-email-0.1.2.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bf7451fc20805c96bbd1396f96422211cdab6a47cd1f311d904563cf38b9ba4 |
|
MD5 | daf952b8bd2ff67b701e94f045b31c85 |
|
BLAKE2b-256 | 8cfe7776e174bd78572776d5243c517d7fa92c021e1aa41c6ac26779c0719fdf |
File details
Details for the file django_async_email-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: django_async_email-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e97783c954417e7907d1b2006481e7240612991c9783c72b9c1afe7cd5ff7685 |
|
MD5 | a989e06b4cc09d167abc19a1c808415a |
|
BLAKE2b-256 | f78f984a02da199e7de555abf94801034d740a072db25d2bdd9ac9bfc3ac9c3b |