[start #32488017] added some logging of send_mail task

pull/1/head
eric 2012-07-10 15:57:44 -04:00
parent 01cb96e65d
commit f2a1bac760
1 changed files with 6 additions and 4 deletions

View File

@ -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"""