lib/ruby_skynet/client.rb in ruby_skynet-0.8.1 vs lib/ruby_skynet/client.rb in ruby_skynet-1.0.0
- old
+ new
@@ -86,10 +86,10 @@
logger.tagged request_id do
logger.benchmark_info "Called Skynet Service: #{skynet_name}.#{method_name}" do
retries = 0
# If it cannot connect to a server, try a different server
begin
- Connection.with_connection(::RubySkynet.services.server_for(skynet_name, skynet_version, skynet_region), connection_params) do |connection|
+ Connection.with_connection(::RubySkynet.service_registry.server_for(skynet_name, skynet_version, skynet_region), connection_params) do |connection|
connection.rpc_call(request_id, skynet_name, method_name, parameters)
end
rescue ResilientSocket::ConnectionFailure => exc
if (retries < 3) && exc.cause.is_a?(Errno::ECONNREFUSED)
retries += 1