lib/zold/commands/remote.rb in zold-0.13.31 vs lib/zold/commands/remote.rb in zold-0.13.32
- old
+ new
@@ -130,22 +130,22 @@
@log.debug("#{host}:#{port} already exists in the list")
else
@remotes.add(host, port)
@log.info("#{host}:#{port} added to the list, #{@remotes.all.count} total")
end
- @log.info("There are #{@remotes.all.count} remote nodes in the list")
+ @log.debug("There are #{@remotes.all.count} remote nodes in the list")
end
def remove(host, port, opts)
if @remotes.exists?(host, port)
@remotes.remove(host, port)
@log.info("#{host}:#{port} removed from the list")
else
raise "#{host}:#{port} is not in the list" unless opts['force']
@log.debug("#{host}:#{port} is not in the list")
end
- @log.info("There are #{@remotes.all.count} remote nodes in the list")
+ @log.debug("There are #{@remotes.all.count} remote nodes in the list")
end
# Returns an array of Zold::Score
def elect(opts)
scores = []
@@ -200,10 +200,11 @@
json['all'].each do |s|
add(s['host'], s['port'], opts) unless @remotes.exists?(s['host'], s['port'])
end
end
capacity << { host: score.host, port: score.port, count: json['all'].count }
- @log.info("#{r}: #{Rainbow(score.value).green} (#{json['version']}) in #{(Time.now - start).round(2)}s")
+ @log.info("#{r}: the score is #{Rainbow(score.value).green} (#{json['version']}) \
+in #{(Time.now - start).round(2)}s")
end
max_capacity = capacity.map { |c| c[:count] }.max || 0
capacity.each do |c|
@remotes.error(c[:host], c[:port]) if c[:count] < max_capacity
end