Skip to content

Instantly share code, notes, and snippets.


treeder/batch.rb Secret

Last active December 7, 2015 23:33
What would you like to do?
rest =
images = JSON.parse(rest.get("").body)
client =
images.each_with_index do |im,i|
puts "Queuing task for image #{i}"
payload = IronWorker.payload
payload = payload.merge({
image_url: "{im['id']}",
operations: [
op: 'sketch',
format: 'jpg',
destination: "image_#{im['id']}"
task = client.tasks.create('USERNAME/image_processor', payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment