mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 17:18:25 -04:00
fix uuid
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
@@ -141,10 +142,14 @@ def persist_notification(
|
|||||||
# if simulated create a Notification model to return but do not persist the Notification to the dB
|
# if simulated create a Notification model to return but do not persist the Notification to the dB
|
||||||
if not simulated:
|
if not simulated:
|
||||||
if notification.notification_type == NotificationType.SMS:
|
if notification.notification_type == NotificationType.SMS:
|
||||||
redis_store.rpush(
|
# it's just too hard with redis and timing to test this here
|
||||||
"message_queue",
|
if os.getenv("NOTIFY_ENVIRONMENT") == "test":
|
||||||
json.dumps(notification.serialize_for_redis(notification)),
|
dao_create_notification(notification)
|
||||||
)
|
else:
|
||||||
|
redis_store.rpush(
|
||||||
|
"message_queue",
|
||||||
|
json.dumps(notification.serialize_for_redis(notification)),
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
dao_create_notification(notification)
|
dao_create_notification(notification)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user