mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Small refactoring of initdb call
This commit is contained in:
@@ -79,12 +79,9 @@ 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:
|
||||
self.write_pg_hba()
|
||||
|
||||
return True
|
||||
|
||||
return False
|
||||
ret = os.system(self._pg_ctl + ' initdb') == 0
|
||||
ret and self.write_pg_hba()
|
||||
return ret
|
||||
|
||||
def sync_from_leader(self, leader):
|
||||
r = parseurl(leader.address)
|
||||
|
||||
Reference in New Issue
Block a user