Install newrelic and enable in development

This commit is contained in:
Ryan Ahearn
2023-01-17 14:08:17 -05:00
parent 2fbe5fa3cb
commit bfeb65c914
6 changed files with 358 additions and 109 deletions

View File

@@ -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