Skip to content
Browse files

Merge pull request #3 from featalion/fix_imq

Sync to latest iron mq ruby gem
  • Loading branch information...
2 parents b22a6be + 52b1512 commit 8359c3d1dcacedaaefe8bfdb0984a47e897b7e07 @treeder treeder committed
Showing with 3 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 hello.rb
  3. +1 −1 workers/tweet_worker.rb
View
1 .gitignore
@@ -1,3 +1,4 @@
.idea/*
config.yml
iron.json
+Gemfile.lock
View
2 hello.rb
@@ -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
2 workers/tweet_worker.rb
@@ -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 8359c3d

Please sign in to comment.
Something went wrong with that request. Please try again.