We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f95410b commit 94510e4Copy full SHA for 94510e4
redis/sentinel.py
@@ -1,3 +1,4 @@
1
+import os
2
import random
3
4
from redis.client import StrictRedis
@@ -90,6 +91,14 @@ def rotate_slaves(self):
90
91
pass
92
raise SlaveNotFoundError('No slave found for %r' % (self.service_name))
93
94
+ def _checkpid(self):
95
+ if self.pid != os.getpid():
96
+ self.disconnect()
97
+ self.__init__(self.service_name, self.sentinel_manager,
98
+ connection_class=self.connection_class,
99
+ max_connections=self.max_connections,
100
+ **self.connection_kwargs)
101
+
102
103
class Sentinel(object):
104
"""
0 commit comments