1# Celery email sending
2
3CELERY_BROKER_URL = 'amqp://localhost'
4
5INSTALLED_APPS += (
6 'djcelery_email',
7 'django_celery_results'
8)
9
10CELERY_EMAIL_TASK_CONFIG = {
11 'name': 'djcelery_email_send',
12 'ignore_result': False,
13}
14
15CELERY_RESULT_BACKEND = 'django-db'
16
17EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'
1import os
2from celery import Celery
3
4os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
5
6app = Celery('mysite')
7app.config_from_object('django.conf:settings', namespace='CELERY')
8app.autodiscover_tasks()
9