From f2a1bac7604b106643ef8f3d14fcd21e62f28cbf Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 10 Jul 2012 15:57:44 -0400 Subject: [PATCH] [start #32488017] added some logging of send_mail task --- core/tasks.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/tasks.py b/core/tasks.py index 5b3d6ccb..08916332 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -62,12 +62,14 @@ def send_mail_task(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None): """a task to drop django.core.mail.send_mail into """ - return send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=auth_user, + try: + r=send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=auth_user, auth_password=auth_password, connection=connection) - - + except: + r=logger.info('failed to send message:' + message) + return r + #task to update the status of active campaigns - @task def update_active_campaign_status(): """update the status of all active campaigns -- presumed to be run at midnight Eastern time"""