mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-09-01 00:59:24 +00:00
Bugfix: sleep method was renamed to watch
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user