Skip to content

Commit

Permalink
fix broken go live email notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Nov 27, 2024
1 parent 4a31b2e commit 61b9948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/service/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ def send_notification_to_service_users(
json.dumps(personalisation),
ex=24 * 60 * 60,
)
print(hilite("GOT PAST FIRST SET"))
redis_store.set(
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)
return notification
Expand Down
4 changes: 1 addition & 3 deletions tests/app/service/test_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ def test_send_notification_to_service_users_sends_to_active_users_only(
notify_service, mocker
):
mocker.patch("app.service.sender.send_notification_to_queue")
mocker.patch(
"app.service.sender.redis_store",
)
mocker.patch("app.service.sender.redis_store", autospec=True)

first_active_user = create_user(email="[email protected]", state="active")
second_active_user = create_user(email="[email protected]", state="active")
Expand Down

0 comments on commit 61b9948

Please sign in to comment.