mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-09-01 09:09:21 +00:00
Check if config is loaded
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ class Ha(object):
|
||||
if self.state_handler.is_leader() or self.state_handler.role == 'master':
|
||||
return message
|
||||
else:
|
||||
if 'pause' in self.cluster.config.data and self.cluster.config.data['pause']:
|
||||
if self.cluster.config and 'pause' in self.cluster.config.data and self.cluster.config.data['pause']:
|
||||
return "Not promoted due to paused state."
|
||||
self.state_handler.promote()
|
||||
self.touch_member()
|
||||
|
||||
Reference in New Issue
Block a user