mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Enable the conditions on normal restart.
This commit is contained in:
+1
-1
@@ -223,7 +223,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
|
||||
else:
|
||||
if 'schedule' not in request:
|
||||
try:
|
||||
status, data = self.server.patroni.ha.restart()
|
||||
status, data = self.server.patroni.ha.restart(request)
|
||||
status_code = 200 if status else 503
|
||||
except Exception:
|
||||
logger.exception('Exception during restart')
|
||||
|
||||
+1
-1
@@ -419,7 +419,7 @@ class Ha(object):
|
||||
reason_to_cancel = "host role mismatch"
|
||||
|
||||
if (postgres_version and
|
||||
self.state_hander.postgres_version_to_int(postgres_version) <= int(self.state_hander.server_version)):
|
||||
self.state_handler.postgres_version_to_int(postgres_version) <= int(self.state_handler.server_version)):
|
||||
reason_to_cancel = "postgres version mismatch"
|
||||
|
||||
if pending_restart and not self.state_handler.pending_restart:
|
||||
|
||||
Reference in New Issue
Block a user