mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Rename with_pending_restart to restart_pending.
This commit is contained in:
@@ -86,7 +86,7 @@ Scenario: check the scheduled restart
|
||||
Then I receive a response code 202
|
||||
And I sleep for 10 seconds
|
||||
And Response on GET http://127.0.0.1:8008/patroni contains pending_restart after 10 seconds
|
||||
Given I issue a scheduled restart at http://127.0.0.1:8008 in 1 seconds with {"with_pending_restart_flag": "True"}
|
||||
Given I issue a scheduled restart at http://127.0.0.1:8008 in 1 seconds with {"restart_pending": "True"}
|
||||
Then I receive a response code 202
|
||||
And Response on GET http://127.0.0.1:8008/patroni does not contain pending_restart after 10 seconds
|
||||
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
|
||||
status_code = 400
|
||||
data = "PostgreSQL version should be in the first.major.minor format"
|
||||
break
|
||||
elif k != 'with_pending_restart_flag':
|
||||
elif k != 'restart_pending':
|
||||
status_code = 400
|
||||
data = "Unknown filter for the scheduled restart: {0}".format(k)
|
||||
break
|
||||
|
||||
+1
-1
@@ -464,7 +464,7 @@ class Ha(object):
|
||||
if (restart_data and isinstance(restart_data, dict) and
|
||||
not self.restart_matches(restart_data.get('role'),
|
||||
restart_data.get('postgres_version'),
|
||||
('with_pending_restart_flag' in restart_data))):
|
||||
('restart_pending' in restart_data))):
|
||||
return (False, "restart conditions are not satisfied")
|
||||
|
||||
with self._async_executor:
|
||||
|
||||
Reference in New Issue
Block a user