Fabriceli commented on code in PR #8651:
URL: https://github.com/apache/apisix/pull/8651#discussion_r1068229998
##########
apisix/discovery/consul/init.lua:
##########
@@ -237,53 +208,80 @@ function _M.connect(premature, consul_server, retry_delay)
log.info("connect consul: ", consul_server.consul_server_url,
", watch_result status: ", watch_result.status,
", watch_result.headers.index: ",
watch_result.headers['X-Consul-Index'],
- ", consul_server.index: ", consul_server.index,
- ", consul_server: ", json_delay_encode(consul_server, true))
+ ", consul_server.index: ", consul_server.index)
-- if current index different last index then update service
if consul_server.index ~= watch_result.headers['X-Consul-Index'] then
+ local up_services = core.table.new(0, #watch_result.body)
+ local consul_client_svc = resty_consul:new({
+ host = consul_server.host,
+ port = consul_server.port,
+ connect_timeout = consul_server.connect_timeout,
+ read_timeout = consul_server.read_timeout,
+ })
+ for service_name, _ in pairs(watch_result.body) do
+ -- check is skip service
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]