I am using typhoeus hydra
hydra = Typhoeus::Hydra.new(max_concurrency: 10)
links.each_with_index do |link, i|
req = Typhoeus::Request.new("#{link}")
req.on_complete do |res|
puts "doing #{i} out of #{links.size}"
threadJob(res.body, i, products)
end
hydra.queue req
end
However, when I run it (hydra.run) it seems as if it is running one by one...
What can be the issue? Thanks