Merge "Compute requires_beating"

This commit is contained in:
Jenkins 2016-02-24 03:37:08 +00:00 committed by Gerrit Code Review
commit 6d6fa0db30
3 changed files with 3 additions and 6 deletions

View File

@ -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]) +

View File

@ -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)

View File

@ -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)