Skip to content

Instantly share code, notes, and snippets.

@i0rek
Created Sep 10, 2012
Embed
What would you like to do?
Hydra
Typhoeus.on_complete {|r| p Time.now.to_f }
hydra = Typhoeus::Hydra.new(max_concurrency: 1)
10.times.map{ hydra.queue(Typhoeus::Request.new("www.example.com")) }
hydra.run
# 1347304950.781197
# 1347304950.9252968
# 1347304951.216028
# 1347304951.3606741
# 1347304951.660367
# 1347304951.80959
# 1347304952.101176
# 1347304952.24737
# 1347304952.541461
# 1347304952.691637
#=> {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment