Skip to content

Commit

Permalink
Merge pull request #243 from isms/240-health-check-interval
Browse files Browse the repository at this point in the history
Add FakeConnection.health_check_interval, closes #240
  • Loading branch information
bmerry authored Jul 30, 2019
2 parents 7c663bf + 513f570 commit d675ee1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fakeredis/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2443,7 +2443,8 @@ class FakeConnection(redis.Connection):

def __init__(self, server, db=0, password=None,
encoding='utf-8', encoding_errors='strict',
decode_responses=False):
decode_responses=False,
health_check_interval=0):
self.pid = os.getpid()
self.db = db
self.password = password
Expand All @@ -2458,6 +2459,9 @@ def __init__(self, server, db=0, password=None,
# override them.
self._parser = _DummyParser()
self._sock = None
# added in redis==3.3.0
self.health_check_interval = health_check_interval
self.next_health_check = 0

def connect(self):
super(FakeConnection, self).connect()
Expand Down

0 comments on commit d675ee1

Please sign in to comment.