lib/zold/commands/push.rb in zold-0.26.15 vs lib/zold/commands/push.rb in zold-0.26.16

- old
+ new

@@ -133,14 +133,12 @@ start = Time.now read_one(id, r, opts) do |json, score| r.assert_valid_score(score) r.assert_score_ownership(score) r.assert_score_strength(score) unless opts['ignore-score-weakness'] - if @log.info? - @log.info("#{r} accepted #{@wallets.acq(id, &:mnemo)} in #{Age.new(start, limit: 4)}: \ + @log.debug("#{r} accepted #{@wallets.acq(id, &:mnemo)} in #{Age.new(start, limit: 4)}: \ #{Rainbow(score.value).green} (#{json['version']})") - end score.value end end def read_one(id, r, opts) @@ -151,21 +149,21 @@ response = Tempfile.open do |f| @wallets.acq(id) { |w| FileUtils.copy_file(w.path, f.path) } r.http(uri).put(f) end if response.status == 304 - @log.info("#{r}: same version of #{@wallets.acq(id, &:mnemo)} there, didn't push \ + @log.debug("#{r}: same version of #{@wallets.acq(id, &:mnemo)} there, didn't push \ in #{Age.new(start, limit: 0.5)}") return 0 end r.assert_code(200, response) json = JsonPage.new(response.body, uri).to_hash score = Score.parse_json(json['score']) yield json, score rescue JsonPage::CantParse, Score::CantParse, RemoteNode::CantAssert => e attempt += 1 if attempt < opts['retry'] - @log.error("#{r} failed to push #{id}, trying again (attempt no.#{attempt}): #{e.message}") + @log.debug("#{r} failed to push #{id}, trying again (attempt no.#{attempt}): #{e.message}") retry end raise e end end