mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 18:22:17 -05:00
Added more logging for provider tasks.
This commit is contained in:
@@ -25,6 +25,7 @@ def deliver_sms(self, notification_id):
|
|||||||
notification = notifications_dao.get_notification_by_id(notification_id)
|
notification = notifications_dao.get_notification_by_id(notification_id)
|
||||||
if not notification:
|
if not notification:
|
||||||
raise NoResultFound()
|
raise NoResultFound()
|
||||||
|
current_app.logger.info("Start sending SMS for notification id: {}".format(notification_id))
|
||||||
send_to_providers.send_sms_to_provider(notification)
|
send_to_providers.send_sms_to_provider(notification)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
try:
|
try:
|
||||||
@@ -46,6 +47,7 @@ def deliver_email(self, notification_id):
|
|||||||
notification = notifications_dao.get_notification_by_id(notification_id)
|
notification = notifications_dao.get_notification_by_id(notification_id)
|
||||||
if not notification:
|
if not notification:
|
||||||
raise NoResultFound()
|
raise NoResultFound()
|
||||||
|
current_app.logger.info("Start sending email for notification id: {}".format(notification_id))
|
||||||
send_to_providers.send_email_to_provider(notification)
|
send_to_providers.send_email_to_provider(notification)
|
||||||
except InvalidEmailError as e:
|
except InvalidEmailError as e:
|
||||||
current_app.logger.exception(e)
|
current_app.logger.exception(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user