Skip to content

Instantly share code, notes, and snippets.

@treeder
Created October 20, 2015 19:35
Show Gist options
  • Save treeder/02dea8dc6cb56be28ac7 to your computer and use it in GitHub Desktop.
Save treeder/02dea8dc6cb56be28ac7 to your computer and use it in GitHub Desktop.
require 'iron_mq'
ironmq = IronMQ::Client.new
q = ironmq.queue("my_queue")
while true
msg = q.get
if msg.nil?
sleep 5
next
end
# PROCESS MESSAGE
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment