iron-io / iron_mq_ruby

Ruby library for IronMQ.
http://www.iron.io
BSD 2-Clause "Simplified" License
35 stars 17 forks source link

:delay not working #5

Closed treeder closed 12 years ago

treeder commented 12 years ago

@ironMQ.queue_name = "testDelay" while res = @ironMQ.messages.get() p res.inspect res.delete end msgTxt = "testMessage-"+Time.now.to_s puts msgTxt @ironMQ.messages.post(msgTxt, {:delay => "1000"}) msg = @ironMQ.messages.get abort msg.body.to_s

CloudMarc commented 12 years ago

I'm still seeing this:

root@ip-10-205-10-156:~/simple_worker_backend.ha/workers# !bun bundle show iron_mq /usr/local/lib/ruby/gems/1.9.1/gems/iron_mq-1.3.1

Is there a problem with my syntax?

@ironMQ.messages.post(msgTxt, {:delay => 1000})

treeder commented 12 years ago

ya, you're right, I posted this and it didn't seem to delay:

:body => "{\"delay\":5,\"body\":\"testMessage-2012-01-04 16:52:39 -0800\"}",

treeder commented 12 years ago

@edsrzf is looking into it. I've also created a test in the gem.

edsrzf commented 12 years ago

I think I figured out the problem. Stupid mistake...

treeder commented 12 years ago

This fixed now?