mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Merge pull request #769 from alphagov/add-log-to-ses-callback
Added logging when the SES callback is successful.
This commit is contained in:
@@ -87,12 +87,17 @@ def process_ses_response():
|
|||||||
|
|
||||||
if not aws_response_dict['success']:
|
if not aws_response_dict['success']:
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
"SES delivery failed: notification {} has error found. Status {}".format(
|
"SES delivery failed: notification id {} and reference {} has error found. Status {}".format(
|
||||||
|
notification.id,
|
||||||
reference,
|
reference,
|
||||||
aws_response_dict['message']
|
aws_response_dict['message']
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
current_app.logger.info('{} callback return status of {} for notification: {}'.format(
|
||||||
|
client_name,
|
||||||
|
notification_status,
|
||||||
|
notification.id))
|
||||||
statsd_client.incr('callback.ses.{}'.format(notification_status))
|
statsd_client.incr('callback.ses.{}'.format(notification_status))
|
||||||
if notification.sent_at:
|
if notification.sent_at:
|
||||||
statsd_client.timing_with_dates(
|
statsd_client.timing_with_dates(
|
||||||
|
|||||||
Reference in New Issue
Block a user