Merge branch 'fix_notification_emails' into 'main'

Update send_node_digest_notifications.py Removing nested transactions

See merge request engineering/remarkbox/remarkbox!17
This commit is contained in:
Russell Ballestrini 2025-06-07 11:17:13 +00:00
commit c9c98950c3

View file

@ -15,15 +15,13 @@ def main():
setup_logging(args.config)
with bootstrap(args.config) as env:
request = env["request"]
with request.tm:
try:
deliver_scheduled_notifications(request)
print("Notifications processed successfully.")
raise SystemExit(0)
except Exception as e:
print("Error processing notifications:", str(e))
raise SystemExit(1)
try:
deliver_scheduled_notifications()
print("Notifications processed successfully.")
raise SystemExit(0)
except Exception as e:
print("Error processing notifications:", str(e))
raise SystemExit(1)
if __name__ == "__main__":
main()