From c6abf857400c6f9cc4ca51bdd4205e3d2ef76ac5 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 2 Sep 2015 08:42:47 +0200 Subject: [PATCH] Bugfix: sleep method was renamed to watch --- patroni.py | 2 +- tests/test_patroni.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patroni.py b/patroni.py index e26a4059..97d34ca2 100755 --- a/patroni.py +++ b/patroni.py @@ -76,7 +76,7 @@ class Patroni: if nap_time <= 0: self.next_run = current_time else: - self.ha.dcs.sleep(nap_time) + self.ha.dcs.watch(nap_time) def run(self): self.api.start() diff --git a/tests/test_patroni.py b/tests/test_patroni.py index c0ea2907..489c4fa6 100644 --- a/tests/test_patroni.py +++ b/tests/test_patroni.py @@ -104,7 +104,7 @@ class TestPatroni(unittest.TestCase): self.p.touch_member = self.touch_member self.p.ha.state_handler.sync_replication_slots = time_sleep self.p.ha.dcs.client.read = etcd_read - self.p.ha.dcs.sleep = time_sleep + self.p.ha.dcs.watch = time_sleep self.assertRaises(SleepException, self.p.run) self.p.ha.state_handler.is_leader = lambda: False self.p.api.start = nop