From 5c75dfeeeef0aa3777a5d900692b6321167f2fc1 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 27 Dec 2021 21:46:53 +0000 Subject: [PATCH] Minor tweaks to Redis config and comments --- handler/db.py | 3 ++- handler/settings.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handler/db.py b/handler/db.py index cdf78c8..088c684 100644 --- a/handler/db.py +++ b/handler/db.py @@ -4,4 +4,5 @@ from redis import StrictRedis # Project imports from settings import settings -r = StrictRedis(unix_socket_path=settings.RedisSocket, db=0) +# Define the Redis endpoint to the socket +r = StrictRedis(unix_socket_path=settings.DB.RedisSocket, db=int(settings.DB.DB)) diff --git a/handler/settings.py b/handler/settings.py index cf77e86..01b8dcb 100644 --- a/handler/settings.py +++ b/handler/settings.py @@ -1,4 +1,5 @@ # Other library imports from ConfigObject import ConfigObject +# Load the configuration settings = ConfigObject(filename="settings.ini")