Enable the conditions on normal restart.

This commit is contained in:
Oleksii Kliukin
2016-07-04 15:46:22 +02:00
parent 7a1e2e0c72
commit 36a86c67d0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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: