Skip to main content

An async Django email backend using celery

Project description

TODO

  • Enviar todas as mensagens que levantem TemplateDoesNotExist para uma fila apropriada

django-async-email

Actions Status Actions Status

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


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)

Uploaded Source

Built Distribution

django_async_email-0.1.2-py2.py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page