Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (15 sloc) 460 Bytes
import logging
conn_log = logging.getLogger("redis.connection")
class StrictRedis(object):
def __init__(self):
self.state = {}
self.connected = False
def connect(self):
self.connected = True
def disconnect(self):
self.connected = False
def set(self, key, val):
if not self.connected:
self.connect = True
conn_log.debug("Connected to redis")
self.state[key] = val