mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
log more info when we receive multiple delivery callbacks for one notification
Previously, we logged a warning containing the notification reference and new status. However it wasn't a great message - this new one includes the notification id, the old status, the time difference and more. This separates out logs for callbacks for notifications we don't know (error level) and duplicates (info level).
This commit is contained in:
@@ -61,9 +61,6 @@ def process_ses_response(ses_request):
|
||||
notification_status
|
||||
)
|
||||
if not notification:
|
||||
warning = "SES callback failed: notification either not found or already updated " \
|
||||
"from sending. Status {} for notification reference {}".format(notification_status, reference)
|
||||
current_app.logger.warning(warning)
|
||||
return
|
||||
|
||||
if not aws_response_dict['success']:
|
||||
|
||||
@@ -81,10 +81,6 @@ def _process_for_status(notification_status, client_name, provider_reference):
|
||||
sent_by=client_name.lower()
|
||||
)
|
||||
if not notification:
|
||||
current_app.logger.warning("{} callback failed: notification {} either not found or already updated "
|
||||
"from sending. Status {}".format(client_name,
|
||||
provider_reference,
|
||||
notification_status))
|
||||
return
|
||||
|
||||
statsd_client.incr('callback.{}.{}'.format(client_name.lower(), notification_status))
|
||||
|
||||
Reference in New Issue
Block a user