last_leader_operation is the propery of Cluster object and the value is set in get_cluster method

This commit is contained in:
Alexander Kukushkin
2015-05-18 13:43:14 +02:00
parent b24fb0488c
commit 422512880f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
+1 -1
View File
@@ -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