mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-09-01 00:59:24 +00:00
If there is no connect_address defined in yml file use address from listen as a fallback
This commit is contained in:
@@ -37,8 +37,9 @@ class Postgresql:
|
||||
|
||||
self.config = config
|
||||
|
||||
connect_address = config.get('connect_address', config['listen']) or config['listen']
|
||||
self.connection_string = 'postgres://{username}:{password}@{connect_address}/postgres'.format(
|
||||
connect_address=self.config['connect_address'], **self.replication)
|
||||
connect_address=connect_address, **self.replication)
|
||||
|
||||
self.conn = None
|
||||
self.cursor_holder = None
|
||||
|
||||
Reference in New Issue
Block a user