Set up Redis database which isn't cleared on quit

This commit is contained in:
Mark Veidemanis 2019-10-08 21:07:54 +01:00
parent da14a86e70
commit 7e90080a2c
1 changed files with 3 additions and 2 deletions

View File

@ -80,8 +80,9 @@ def initConf():
loadConf(i) loadConf(i)
def initMain(): def initMain():
global r global r, g
initConf() initConf()
r = StrictRedis(unix_socket_path=config["RedisSocket"], db=0) r = StrictRedis(unix_socket_path=config["RedisSocket"], db=0) # Ephemeral - flushed on quit
g = StrictRedis(unix_socket_path=config["RedisSocket"], db=1) # Persistent