Method: Zold::Fetch#fetch

Defined in:
lib/zold/commands/fetch.rb

#fetch(id, cps, opts) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/zold/commands/fetch.rb', line 65

def fetch(id, cps, opts)
  total = 0
  @remotes.all.each do |r|
    done = fetch_one(id, r, cps, opts)
    if done
      total += 1
    else
      @remotes.error(r[:host], r[:port])
    end
  end
  @log.debug("#{total} copies fetched, there are #{cps.all.count} available locally")
end