def __init__(self, patroni): self.patroni = patroni self.state_handler = patroni.postgresql self.dcs = patroni.dcs self.cluster = None self.old_cluster = None self._async_executor = AsyncExecutor()
def __init__(self, patroni): self.patroni = patroni self.state_handler = patroni.postgresql self.dcs = patroni.dcs self.cluster = None self.old_cluster = None self.recovering = False self._async_executor = AsyncExecutor() # Each member publishes various pieces of information to the DCS using touch_member. This lock protects # the state and publishing procedure to have consistent ordering and avoid publishing stale values. self._member_state_lock = RLock() # Count of concurrent sync disabling requests. Value above zero means that we don't want to be synchronous # standby. Changes protected by _member_state_lock. self._disable_sync = 0
def setUp(self): self.a = AsyncExecutor(Mock(), Mock())
def setUp(self): self.a = AsyncExecutor()