From e43bd7e03c01782f8b329f3f62b16ea685e0f031 Mon Sep 17 00:00:00 2001 From: joamag Date: Sat, 7 Mar 2015 16:03:04 +0000 Subject: [PATCH] new support for session file path --- src/quorum/redisdb.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/quorum/redisdb.py b/src/quorum/redisdb.py index 82a3aa5a..b88cb2cf 100644 --- a/src/quorum/redisdb.py +++ b/src/quorum/redisdb.py @@ -37,9 +37,11 @@ __license__ = "Apache License, Version 2.0" """ The license for the module """ +import os import json import shelve +from . import config from . import exceptions try: import redis @@ -96,8 +98,10 @@ class RedisShelve(RedisMemory): def __init__(self, path = "redis.shelve"): RedisMemory.__init__(self) + base_path = config.conf("SESSION_FILE_PATH", "") + file_path = os.path.join(base_path, path) self.values = shelve.open( - path, + file_path, protocol = 2, writeback = True )