mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Install newrelic and enable in development
This commit is contained in:
@@ -105,13 +105,13 @@ def persist_notification(
|
||||
document_download_count=None,
|
||||
updated_at=None
|
||||
):
|
||||
current_app.logger.info('Presisting notification')
|
||||
current_app.logger.info('Persisting notification')
|
||||
|
||||
notification_created_at = created_at or datetime.utcnow()
|
||||
if not notification_id:
|
||||
notification_id = uuid.uuid4()
|
||||
|
||||
current_app.logger.info('Presisting notification with id {}'.format(notification_id))
|
||||
current_app.logger.info('Persisting notification with id {}'.format(notification_id))
|
||||
|
||||
notification = Notification(
|
||||
id=notification_id,
|
||||
@@ -136,7 +136,7 @@ def persist_notification(
|
||||
updated_at=updated_at
|
||||
)
|
||||
|
||||
current_app.logger.info('Presisting notification with to address: {}'.format(notification.to))
|
||||
current_app.logger.info('Persisting notification with to address: {}'.format(notification.to))
|
||||
|
||||
if notification_type == SMS_TYPE:
|
||||
formatted_recipient = validate_and_format_phone_number(recipient, international=True)
|
||||
@@ -146,9 +146,9 @@ def persist_notification(
|
||||
notification.phone_prefix = recipient_info.country_prefix
|
||||
notification.rate_multiplier = recipient_info.billable_units
|
||||
elif notification_type == EMAIL_TYPE:
|
||||
current_app.logger.info('Presisting notification with type: {}'.format(EMAIL_TYPE))
|
||||
current_app.logger.info('Persisting notification with type: {}'.format(EMAIL_TYPE))
|
||||
notification.normalised_to = format_email_address(notification.to)
|
||||
current_app.logger.info('Presisting notification to formatted email: {}'.format(notification.normalised_to))
|
||||
current_app.logger.info('Persisting notification to formatted email: {}'.format(notification.normalised_to))
|
||||
elif notification_type == LETTER_TYPE:
|
||||
notification.postage = postage
|
||||
notification.international = postage in INTERNATIONAL_POSTAGE_TYPES
|
||||
|
||||
Reference in New Issue
Block a user