From 9f5c83865ebcca3293d8f30dea6ea6fa8ed5abc2 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 10 Nov 2023 23:49:33 -0500 Subject: Moved to Redis Cloud --- chat/chat_cache.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'chat') diff --git a/chat/chat_cache.py b/chat/chat_cache.py index 43354ef7..8c107a6c 100644 --- a/chat/chat_cache.py +++ b/chat/chat_cache.py @@ -2,7 +2,17 @@ import json import redis -r = redis.Redis(host='localhost', port=6379, db=0) +import os +from dotenv import load_dotenv + +load_dotenv() + +r = redis.Redis( + host=os.getenv('REDIS_HOST'), + port=os.getenv('REDIS_PORT'), + password=os.getenv('REDIS_PASSWORD'), + db=0 +) def handle_connect(): # increase number of connected users -- cgit v1.2.3