revamp PII masking

This commit is contained in:
Kenneth Kehl
2024-06-17 11:12:30 -07:00
52 changed files with 112 additions and 4959 deletions

View File

@@ -113,14 +113,17 @@ def send_sms_to_provider(notification):
message_id = provider.send_sms(**send_sms_kwargs)
current_app.logger.info(f"got message_id {message_id}")
except Exception as e:
msg = f"FAILED sending message for this recipient: {recipient} to sms"
n = notification
msg = f"FAILED send to sms, job_id: {n.job_id} row_number {n.job_row_number} message_id {message_id}"
current_app.logger.error(hilite(f"{msg} {e}"))
notification.billable_units = template.fragment_count
dao_update_notification(notification)
raise e
else:
msg = f"Sending message for this recipient: {recipient} to sms"
# Here we map the job_id and row number to the aws message_id
n = notification
msg = f"Send to aws for job_id {n.job_id} row_number {n.job_row_number} message_id {message_id}"
current_app.logger.info(hilite(msg))
notification.billable_units = template.fragment_count
update_notification_to_sending(notification, provider)