From 08ad67c6de80b28322c35b40ff2b1cd1fcc378a3 Mon Sep 17 00:00:00 2001 From: Groupr Date: Mon, 2 Jun 2025 23:33:13 +0000 Subject: [PATCH 1/3] Update notify.py --- remarkbox/lib/notify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remarkbox/lib/notify.py b/remarkbox/lib/notify.py index 04f14ab..c8d5bfd 100644 --- a/remarkbox/lib/notify.py +++ b/remarkbox/lib/notify.py @@ -257,4 +257,4 @@ def send_digest_notifications(request, notification_dict, frequency="daily"): for notification in notifications: notification.sent = True request.dbsession.add(notification) - request.dbsession.flush() + request.dbsession.flush() From 33905a6891a1416759caaa402c1d94e6bb1c99f1 Mon Sep 17 00:00:00 2001 From: Groupr Date: Mon, 2 Jun 2025 23:40:14 +0000 Subject: [PATCH 2/3] Update notify.py --- remarkbox/lib/notify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remarkbox/lib/notify.py b/remarkbox/lib/notify.py index c8d5bfd..04f14ab 100644 --- a/remarkbox/lib/notify.py +++ b/remarkbox/lib/notify.py @@ -257,4 +257,4 @@ def send_digest_notifications(request, notification_dict, frequency="daily"): for notification in notifications: notification.sent = True request.dbsession.add(notification) - request.dbsession.flush() + request.dbsession.flush() From 0fdb2bb529d91bbef1d51f88a64c6c19d58dade1 Mon Sep 17 00:00:00 2001 From: Groupr Date: Tue, 3 Jun 2025 00:46:27 +0000 Subject: [PATCH 3/3] Update send_node_digest_notifications.py --- remarkbox/scripts/send_node_digest_notifications.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/remarkbox/scripts/send_node_digest_notifications.py b/remarkbox/scripts/send_node_digest_notifications.py index d76ace9..874a726 100644 --- a/remarkbox/scripts/send_node_digest_notifications.py +++ b/remarkbox/scripts/send_node_digest_notifications.py @@ -16,16 +16,13 @@ def main(): with bootstrap(args.config) as env: request = env["request"] - with transaction.manager: + with request.tm: try: deliver_scheduled_notifications(request) - print("Committing transaction.") - transaction.commit() - print("Committed transaction.") + print("Notifications processed successfully.") raise SystemExit(0) except Exception as e: - print("Aborting transaction.") - transaction.abort() + print("Error processing notifications:", str(e)) raise SystemExit(1) if __name__ == "__main__":