Merge "Add 'requires_beating' property to coordination driver"
This commit is contained in:
commit
bbfe40bc26
|
@ -64,6 +64,14 @@ class LeaderElected(Event):
|
|||
@six.add_metaclass(abc.ABCMeta)
|
||||
class CoordinationDriver(object):
|
||||
|
||||
requires_beating = False
|
||||
"""
|
||||
Usage requirement that if true requires that the :py:meth:`~.heartbeat`
|
||||
be called periodically (at a given rate) to avoid locks, sessions and
|
||||
other from being automatically closed/discarded by the coordinators
|
||||
backing store.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self._started = False
|
||||
self._hooks_join_group = collections.defaultdict(Hooks)
|
||||
|
|
|
@ -145,6 +145,9 @@ 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)
|
||||
|
|
|
@ -286,6 +286,9 @@ 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