Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add polling loop to IronMQ examples code #173

Open
treeder opened this Issue · 2 comments

3 participants

@treeder
Owner

Suggestion from customer to have this on this page: http://dev.iron.io/mq/

I agree, this is probably the most common usage of IronMQ.

So instead of just get example, it would have the typical polling loop, something like:

while true
  msg = queue.get()
  if msg.nil?
    sleep 1
    next
  end
  # do something with the message here
  p msg.body
end
@paddyforan paddyforan was assigned
@manveru
loop do
  unless msg = queue.get
    next sleep 1
  end
  # what's the message?
  p msg
  # other stuff
end
@paddyforan

Removing my assignment.

@paddyforan paddyforan removed their assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.