From a2fc97000b4c36db69ea9411fa1120a88e27c662 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Wed, 8 Jan 2025 08:58:24 -0800 Subject: [PATCH] cleanup pending notifications --- app/dao/notifications_dao.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 36eeafa92..c8f2797a0 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -793,7 +793,9 @@ def dao_close_out_delivery_receipts(): .values(status=NotificationStatus.FAILED, provider_response="Technical Failure") ) result = db.session.execute(stmt) - current_app.logger.info( - f"Marked {result.rowcount} notifications as technical failures" - ) + db.session.commit() + if result: + current_app.logger.info( + f"Marked {result.rowcount} notifications as technical failures" + )