Improve log message

This commit is contained in:
Rebecca Law
2018-03-09 12:01:08 +00:00
parent e95740a6b5
commit a3d04ca672
2 changed files with 9 additions and 4 deletions

View File

@@ -73,7 +73,9 @@ def send_delivery_status_to_service(self, notification_id,
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
current_app.logger.exception(
'Retry: send_delivery_status_to_service has retried the max num of times')
"""Retry: send_delivery_status_to_service has retried the max num of times
for notification: {}""".format(notification_id)
)
def process_update_with_notification_id(self, notification_id):
@@ -135,4 +137,7 @@ def process_update_with_notification_id(self, notification_id):
try:
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
current_app.logger.exception('Retry: send_delivery_status_to_service has retried the max num of times')
current_app.logger.exception(
"""Retry: send_delivery_status_to_service has retried the max num of times
for notification: {}""".format(notification_id)
)

View File

@@ -361,8 +361,8 @@ def replay_service_callbacks(file_name, service_id):
send_delivery_status_to_service.apply_async([str(n.id), encrypted_status_update],
queue=QueueNames.CALLBACKS)
print("Replay service status for service: {}. Sent {} notification status updates".format(service_id,
len(notifications)))
print("Replay service status for service: {}. Sent {} notification status updates to the queue".format(
service_id, len(notifications)))
def setup_commands(application):