Permalink
Browse files

switch to new iron_mq library

  • Loading branch information...
1 parent e2bb80d commit 52b1512af3a82f3c9f2d0cf2be1a5f1aca3dcb98 @featalion featalion committed May 30, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 hello.rb
  2. +1 −1 workers/tweet_worker.rb
View
@@ -49,7 +49,7 @@
if session[:worker_id]
@running = true
end
- @msg = settings.ironmq.messages.get(:queue_name=>settings.queue_name)
+ @msg = settings.ironmq.queue(settings.queue_name).get
@msg.delete if @msg
erb :hello
end
View
@@ -9,6 +9,6 @@
mq_params = params['mq']
ironmq = IronMQ::Client.new('token' => mq_params['token'], 'project_id' => mq_params['project_id'])
-response = ironmq.messages.post(tweet, :queue_name => mq_params['queue_name'])
+response = ironmq.queue(mq_params['queue_name']).post(tweet)
puts "tweet put on queue. " + response.inspect

0 comments on commit 52b1512

Please sign in to comment.