From 7b2e59dede08c9c76ff2c2050e163dc76a4a6d10 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Wed, 10 Jan 2024 10:30:44 -0800 Subject: [PATCH] switch to raw_get and raw_set to see exceptions --- app/delivery/send_to_providers.py | 2 +- app/user/rest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index b258c41c4..407e39e66 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -78,7 +78,7 @@ def send_sms_to_provider(notification): ) except BaseException: key = f"2facode-{notification.id}".replace(" ", "") - my_phone = redis_store.get(key) + my_phone = redis_store.raw_get(key) if my_phone: my_phone = my_phone.decode("utf-8") diff --git a/app/user/rest.py b/app/user/rest.py index 026da6c70..e4544c083 100644 --- a/app/user/rest.py +++ b/app/user/rest.py @@ -352,7 +352,7 @@ def create_2fa_code( ) 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')}") key = f"2facode-{saved_notification.id}".replace(" ", "") @@ -361,8 +361,8 @@ def create_2fa_code( current_app.logger.info( f"IN REST, WHERE WE SET THE VALUE, KEY IS {key} and value is {recipient}" ) - redis_store.set(key, recipient) - stored_recipient = redis_store.get(key) + redis_store.raw_set(key, recipient) + stored_recipient = redis_store.raw_get(key) # TODO REMOVE current_app.logger.info( f"IN REST, WHERE WE GET THE VALUE, KEY IS {key} and value is {stored_recipient}"