From 929ff08bfde51b28cf90d7bea92db0a5838a4284 Mon Sep 17 00:00:00 2001 From: Pavel Kirillov Date: Fri, 21 Dec 2018 16:42:15 +0200 Subject: [PATCH] Service deregister timeout must be in Go time format (#893) --- patroni/dcs/consul.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patroni/dcs/consul.py b/patroni/dcs/consul.py index 1547710b3..950da93cd 100644 --- a/patroni/dcs/consul.py +++ b/patroni/dcs/consul.py @@ -389,7 +389,8 @@ def _update_service(self, data): api_parts = urlparse(data['api_url']) api_parts = api_parts._replace(path='/{0}'.format(role)) conn_parts = urlparse(data['conn_url']) - check = base.Check.http(api_parts.geturl(), self._service_check_interval, deregister=self._client.http.ttl * 10) + check = base.Check.http(api_parts.geturl(), self._service_check_interval, + deregister='{0}s'.format(self._client.http.ttl * 10)) params = { 'service_id': '{0}/{1}'.format(self._scope, self._name), 'address': conn_parts.hostname,