mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-26 23:50:23 +00:00
last_leader_operation is the propery of Cluster object and the value is set in get_cluster method
This commit is contained in:
@@ -92,6 +92,7 @@ class Etcd:
|
||||
node = self.find_node(node, '/leader')
|
||||
if node:
|
||||
last_leader_operation = int(node['value'])
|
||||
print(last_leader_operation)
|
||||
|
||||
# get leader
|
||||
leader = None
|
||||
|
||||
@@ -79,7 +79,7 @@ class Postgresql:
|
||||
return not os.path.exists(self.data_dir) or os.listdir(self.data_dir) == []
|
||||
|
||||
def initialize(self):
|
||||
if os.system(self._pg_ctl + ' initdb') == 0:
|
||||
if os.system(self._pg_ctl + ' initdb -o --encoding=UTF8') == 0:
|
||||
self.write_pg_hba()
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user