diff --git a/helpers/etcd.py b/helpers/etcd.py index 29552a2b..ecffc9ec 100644 --- a/helpers/etcd.py +++ b/helpers/etcd.py @@ -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 diff --git a/helpers/postgresql.py b/helpers/postgresql.py index 7b8a15c8..4fd16880 100644 --- a/helpers/postgresql.py +++ b/helpers/postgresql.py @@ -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