fix broken go live email notification

This commit is contained in:
Kenneth Kehl
2024-11-27 10:46:49 -08:00
parent 4a31b2ece6
commit 61b9948270
2 changed files with 3 additions and 3 deletions

View File

@@ -52,9 +52,11 @@ def send_notification_to_service_users(
json.dumps(personalisation), json.dumps(personalisation),
ex=24 * 60 * 60, ex=24 * 60 * 60,
) )
print(hilite("GOT PAST FIRST SET"))
redis_store.set( redis_store.set(
f"email-recipient-{notification.id}", notification.to, ex=24 * 60 * 60 f"email-recipient-{notification.id}", notification.to, ex=24 * 60 * 60
) )
print(hilite("GOT PAST SECOND SET"))
send_notification_to_queue(notification, queue=QueueNames.NOTIFY) send_notification_to_queue(notification, queue=QueueNames.NOTIFY)
return notification return notification

View File

@@ -87,9 +87,7 @@ def test_send_notification_to_service_users_sends_to_active_users_only(
notify_service, mocker notify_service, mocker
): ):
mocker.patch("app.service.sender.send_notification_to_queue") mocker.patch("app.service.sender.send_notification_to_queue")
mocker.patch( mocker.patch("app.service.sender.redis_store", autospec=True)
"app.service.sender.redis_store",
)
first_active_user = create_user(email="foo@bar.com", state="active") first_active_user = create_user(email="foo@bar.com", state="active")
second_active_user = create_user(email="foo1@bar.com", state="active") second_active_user = create_user(email="foo1@bar.com", state="active")