From 3414c8e15a943a168ad4ca94ebdc7a313dac6d73 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 12 Jan 2024 14:28:14 -0800 Subject: [PATCH] fix redis issue causing error in log --- app/celery/scheduled_tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/celery/scheduled_tasks.py b/app/celery/scheduled_tasks.py index adea57ed3..8ab8bbcb9 100644 --- a/app/celery/scheduled_tasks.py +++ b/app/celery/scheduled_tasks.py @@ -98,6 +98,8 @@ def expire_or_delete_invitations(): raise +# TODO THIS IS ACTUALLY DEPRECATED, WE ARE REMOVING PHONE NUMBERS FROM THE DB +# SO THERE WILL BE NO REASON TO KEEP TRACK OF THIS COUNT @notify_celery.task(name="check-db-notification-fails") def check_db_notification_fails(): """ @@ -110,7 +112,7 @@ def check_db_notification_fails(): on a breach. I.e., if the last number was at 23% and the current number is 27%, send an email. But if the last number was 26% and the current is 27%, don't. """ - last_value = redis_store.get("LAST_DB_NOTIFICATION_COUNT") + last_value = redis_store.get("LAST_DB_NOTIFICATION_COUNT").decode("utf-8") if not last_value: last_value = 0