Fix test failures.

This commit is contained in:
Rebecca Law
2016-11-11 17:28:15 +00:00
parent 8f0a96c76c
commit 4379308189

View File

@@ -150,12 +150,12 @@ def send_sms(self,
) )
except SQLAlchemyError as e: except SQLAlchemyError as e:
current_app.logger.exception("RETRY: send_sms notification {}".format(saved_notification.id), e) current_app.logger.exception("RETRY: send_sms notification", e)
try: try:
raise self.retry(queue="retry", exc=e) raise self.retry(queue="retry", exc=e)
except self.MaxRetriesExceededError: except self.MaxRetriesExceededError:
current_app.logger.exception( current_app.logger.exception(
"RETRY FAILED: task send_sms failed for notification {}".format(saved_notification.id), "RETRY FAILED: task send_sms failed for notification",
e e
) )
@@ -198,11 +198,11 @@ def send_email(self, service_id,
current_app.logger.info("Email {} created at {}".format(saved_notification.id, created_at)) current_app.logger.info("Email {} created at {}".format(saved_notification.id, created_at))
except SQLAlchemyError as e: except SQLAlchemyError as e:
current_app.logger.exception("RETRY: send_email notification {}".format(saved_notification.id), e) current_app.logger.exception("RETRY: send_email notification", e)
try: try:
raise self.retry(queue="retry", exc=e) raise self.retry(queue="retry", exc=e)
except self.MaxRetriesExceededError: except self.MaxRetriesExceededError:
current_app.logger.error( current_app.logger.error(
"RETRY FAILED: task send_email failed for notification {}".format(saved_notification.id), "RETRY FAILED: task send_email failed for notification",
e e
) )