lib/zold/commands/remote.rb in zold-0.14.43 vs lib/zold/commands/remote.rb in zold-0.14.44
- old
+ new
@@ -27,10 +27,11 @@
require 'json'
require 'time'
require_relative 'args'
require_relative '../node/farm'
require_relative '../log'
+require_relative '../age'
require_relative '../json_page'
require_relative '../http'
require_relative '../remotes'
require_relative '../score'
require_relative '../wallet'
@@ -242,11 +243,10 @@
add(s['host'], s['port'], opts)
@log.info("#{s['host']}:#{s['port']} found at #{r} and added")
end
end
capacity << { host: score.host, port: score.port, count: json['all'].count }
- @log.info("#{r}: the score is #{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 #{Age.new(start)}")
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