Skip to content

Instantly share code, notes, and snippets.

@fortyfivan
Last active September 7, 2015 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fortyfivan/c9a0ecf875f6c756d358 to your computer and use it in GitHub Desktop.
Save fortyfivan/c9a0ecf875f6c756d358 to your computer and use it in GitHub Desktop.
require "iron_worker_ng"
require "faker"
n = ARGV[0].to_i
client = IronWorkerNG::Client.new
n.times do
id = Faker::Number.number(10)
lat = Faker::Address.latitude
lon = Faker::Address.longitude
client.tasks.create("windmill", "id" => id, "lat" => lat, "lon" => lon)
puts "Running calculator worker for windmill id: #{id} at location: #{lat} #{lon}\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment