lib/zold/commands/remote.rb in zold-0.29.27 vs lib/zold/commands/remote.rb in zold-0.29.28

- old
+ new

@@ -259,11 +259,12 @@ all.each do |r| next if r[:errors] <= opts['tolerate'] @remotes.remove(r[:host], r[:port]) if !opts['masters-too'] || !r[:master] @log.debug("#{r[:host]}:#{r[:port]} removed because of #{r[:errors]} errors (over #{opts['tolerate']})") end - @log.info("The list of #{all.count} remotes trimmed down to #{@remotes.all.count} nodes") + @log.info("The list of #{all.count} remotes trimmed down to #{@remotes.all.count} nodes \ +(#{@remotes.all.count { |r| r[:master] }} masters)") end def update(opts) st = Time.now seen = Set.new @@ -297,11 +298,13 @@ end total = @remotes.all.size if total.zero? @log.info("The list of remotes is #{Rainbow('empty').red}, run 'zold remote reset'!") else - @log.info("There are #{total} known remotes with the overall score of \ + @log.info("There are #{total} known remotes \ +(#{@remotes.all.count { |r| r[:master] }} masters) \ +with the overall score of \ #{@remotes.all.map { |r| r[:score] }.inject(&:+)}, after update in #{Age.new(st)}") end end def update_one(r, opts) @@ -352,10 +355,11 @@ next if idx < opts['max-nodes'] next if r[:master] && !opts['masters-too'] @remotes.remove(r[:host], r[:port]) @log.debug("Remote #{r[:host]}:#{r[:port]}/#{r[:score]}/#{r[:errors]}e removed from the list") end - @log.info("#{@remotes.all.count} best remote nodes were selected to stay in the list") + @log.info("#{@remotes.all.count} best remote nodes were selected to stay in the list \ +(#{@remotes.all.count { |r| r[:master] }} masters)") end def terminate @log.info("All threads before exit: #{Thread.list.map { |t| "#{t.name}/#{t.status}" }.join(', ')}") require_relative '../node/front'