mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:09:49 -04:00
- Commit session on job update
- log at exception level
This commit is contained in:
@@ -282,7 +282,7 @@ def send_email(service_id, notification_id, subject, from_address, encrypted_not
|
|||||||
)
|
)
|
||||||
update_notification_reference_by_id(notification_id, reference)
|
update_notification_reference_by_id(notification_id, reference)
|
||||||
except AwsSesClientException as e:
|
except AwsSesClientException as e:
|
||||||
current_app.logger.debug(e)
|
current_app.logger.exception(e)
|
||||||
notification_db_object.status = 'failed'
|
notification_db_object.status = 'failed'
|
||||||
dao_update_notification(notification_db_object)
|
dao_update_notification(notification_db_object)
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ def update_job_sent_count(notification):
|
|||||||
Job.notifications_sent: Job.notifications_sent + 1,
|
Job.notifications_sent: Job.notifications_sent + 1,
|
||||||
Job.updated_at: datetime.utcnow()
|
Job.updated_at: datetime.utcnow()
|
||||||
})
|
})
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
def dao_update_notification(notification):
|
def dao_update_notification(notification):
|
||||||
|
|||||||
Reference in New Issue
Block a user