Merge "Compute requires_beating"
This commit is contained in:
commit
6d6fa0db30
|
@ -154,6 +154,9 @@ class CoordinationDriver(object):
|
|||
self._hooks_elected_leader = collections.defaultdict(Hooks)
|
||||
# A cache for group members
|
||||
self._group_members = collections.defaultdict(set)
|
||||
self.requires_beating = (
|
||||
CoordinationDriver.heartbeat != self.__class__.heartbeat
|
||||
)
|
||||
|
||||
def _has_hooks_for_group(self, group_id):
|
||||
return (len(self._hooks_join_group[group_id]) +
|
||||
|
|
|
@ -217,9 +217,6 @@ class MemcachedDriver(coordination._RunWatchersMixin,
|
|||
#: String used to keep a key/member alive (until it next expires).
|
||||
STILL_ALIVE = b"It's alive!"
|
||||
|
||||
#: This driver requires constant periodic (heart) beatings.
|
||||
requires_beating = True
|
||||
|
||||
def __init__(self, member_id, parsed_url, options):
|
||||
super(MemcachedDriver, self).__init__()
|
||||
options = utils.collapse(options)
|
||||
|
|
|
@ -316,9 +316,6 @@ return 1
|
|||
.. _Lua: http://www.lua.org
|
||||
"""
|
||||
|
||||
#: This driver requires constant periodic (heart) beatings.
|
||||
requires_beating = True
|
||||
|
||||
def __init__(self, member_id, parsed_url, options):
|
||||
super(RedisDriver, self).__init__()
|
||||
options = utils.collapse(options, exclude=self.CLIENT_LIST_ARGS)
|
||||
|
|
Loading…
Reference in New Issue