From 5b89d4818af24c25af84db3cbc02ecedc23150a4 Mon Sep 17 00:00:00 2001 From: Kyle MacMillan Date: Mon, 2 Dec 2024 15:30:41 -0500 Subject: [PATCH] Updated default uuid --- app/notifications/process_notifications.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/notifications/process_notifications.py b/app/notifications/process_notifications.py index 23c18f3f26..a68dca4f5a 100644 --- a/app/notifications/process_notifications.py +++ b/app/notifications/process_notifications.py @@ -1,7 +1,7 @@ import uuid from datetime import datetime -from flask import current_app +from flask import current_app, g from celery import chain from notifications_utils.clients import redis @@ -92,7 +92,8 @@ def persist_notification( notification_created_at = created_at or datetime.utcnow() if notification_id is None: - notification_id = uuid.uuid4() + # utils sets this so we can unify logging + notification_id = g.request_id if getattr(g, 'request_id', '') else uuid.uuid4() notification = Notification( id=notification_id,