Reschedule next ha loop after promote

This commit is contained in:
Alexander Kukushkin
2015-09-02 13:25:33 +02:00
parent c6abf85740
commit 0beecb97a7
+2
View File
@@ -70,6 +70,8 @@ class Patroni:
self.postgresql.load_replication_slots()
def schedule_next_run(self):
if self.postgresql.is_promoted:
self.next_run = time.time()
self.next_run += self.nap_time
current_time = time.time()
nap_time = self.next_run - current_time