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")