make celery emails config a dict
This commit is contained in:
parent
aa90e2a049
commit
032f430a13
1 changed files with 2 additions and 9 deletions
|
|
@ -49,15 +49,8 @@ def setup_celery(app, conf):
|
|||
|
||||
if conf.celery_error_emails:
|
||||
app.conf.CELERY_SEND_TASK_ERROR_EMAILS = True
|
||||
app.conf.ADMINS = conf.celery_error_email_recepients
|
||||
if conf.mail_port:
|
||||
app.conf.EMAIL_PORT = conf.mail_port
|
||||
if conf.mail_server:
|
||||
app.conf.EMAIL_HOST = conf.mail_server
|
||||
if conf.mail_user:
|
||||
app.conf.EMAIL_HOST_USER = conf.mail_user
|
||||
if conf.mail_password:
|
||||
app.conf.EMAIL_HOST_PASSWORD = conf.mail_password
|
||||
for k, v in conf.celery_error_emails.iteritems():
|
||||
setattr(app.conf, k, v)
|
||||
|
||||
class SiteRouter(object):
|
||||
def route_for_task(self, task, args=None, kwargs=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue