more debug

This commit is contained in:
Kenneth Kehl
2024-04-19 09:14:36 -07:00
parent 65c87040c2
commit 751e8ab077
2 changed files with 19 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ import json
import os
from datetime import datetime
from app.utils import hilite
from flask import Blueprint, current_app, jsonify, request
from itsdangerous import BadData, SignatureExpired
from notifications_utils.url_safe_token import check_token, generate_token
@@ -32,6 +33,10 @@ register_errors(service_invite)
def _create_service_invite(invited_user, invite_link_host):
# TODO REMOVE DEBUG
print(hilite("ENTER _create_service_invite"))
# END DEBUG
template_id = current_app.config["INVITATION_EMAIL_TEMPLATE_ID"]
template = dao_get_template_by_id(template_id)
@@ -85,11 +90,15 @@ def _create_service_invite(invited_user, invite_link_host):
# This is for the login.gov service invite on the
# "Set Up Your Profile" path.
redis_key = f"service-invite-{invited_user.email_address}"
redis_store.set(
f"service-invite-{invited_user.email_address}",
redis_key,
json.dumps(data),
ex=3600 * 24,
)
# TODO REMOVE DEBUG
print(hilite(f"Save this data {data} with this redis_key {redis_key}"))
# END DEBUG
send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY)