Updates after code review.

- Remove print
- Update exception message.
This commit is contained in:
Rebecca Law
2018-03-19 14:08:38 +00:00
parent 0dc50190b2
commit cd2d85f2a3
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ def deliver_sms(self, notification_id):
)
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
message = "RETRY FAILED: task send_sms_to_provider failed for notification {}. " \
message = "RETRY FAILED: Max retries reached. The task send_sms_to_provider failed for notification {}. " \
"Notification has been updated to technical-failure".format(notification_id)
update_notification_status_by_id(notification_id, NOTIFICATION_TECHNICAL_FAILURE)
raise NotificationTechnicalFailureException(message)
@@ -57,7 +57,8 @@ def deliver_email(self, notification_id):
)
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
message = "RETRY FAILED: task send_email_to_provider failed for notification {}. " \
message = "RETRY FAILED: Max retries reached. " \
"The task send_email_to_provider failed for notification {}. " \
"Notification has been updated to technical-failure".format(notification_id)
update_notification_status_by_id(notification_id, NOTIFICATION_TECHNICAL_FAILURE)
raise NotificationTechnicalFailureException(message)