mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
switch to raw_get and raw_set to see exceptions
This commit is contained in:
@@ -78,7 +78,7 @@ def send_sms_to_provider(notification):
|
|||||||
)
|
)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
key = f"2facode-{notification.id}".replace(" ", "")
|
key = f"2facode-{notification.id}".replace(" ", "")
|
||||||
my_phone = redis_store.get(key)
|
my_phone = redis_store.raw_get(key)
|
||||||
|
|
||||||
if my_phone:
|
if my_phone:
|
||||||
my_phone = my_phone.decode("utf-8")
|
my_phone = my_phone.decode("utf-8")
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ def create_2fa_code(
|
|||||||
)
|
)
|
||||||
|
|
||||||
current_app.logger.info("TESTING REDIS")
|
current_app.logger.info("TESTING REDIS")
|
||||||
redis_store.set("TESTKEY5", "WORKS")
|
redis_store.raw_set("TESTKEY5", "WORKS")
|
||||||
current_app.logger.info(f"SHOULD SEE THE WORD 'WORKS' HERE: {redis_store.get('TESTKEY5')}")
|
current_app.logger.info(f"SHOULD SEE THE WORD 'WORKS' HERE: {redis_store.get('TESTKEY5')}")
|
||||||
|
|
||||||
key = f"2facode-{saved_notification.id}".replace(" ", "")
|
key = f"2facode-{saved_notification.id}".replace(" ", "")
|
||||||
@@ -361,8 +361,8 @@ def create_2fa_code(
|
|||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"IN REST, WHERE WE SET THE VALUE, KEY IS {key} and value is {recipient}"
|
f"IN REST, WHERE WE SET THE VALUE, KEY IS {key} and value is {recipient}"
|
||||||
)
|
)
|
||||||
redis_store.set(key, recipient)
|
redis_store.raw_set(key, recipient)
|
||||||
stored_recipient = redis_store.get(key)
|
stored_recipient = redis_store.raw_get(key)
|
||||||
# TODO REMOVE
|
# TODO REMOVE
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"IN REST, WHERE WE GET THE VALUE, KEY IS {key} and value is {stored_recipient}"
|
f"IN REST, WHERE WE GET THE VALUE, KEY IS {key} and value is {stored_recipient}"
|
||||||
|
|||||||
Reference in New Issue
Block a user