code_junkie

What's the best way to perform system tasks from Ruby on Rails?

Nov 12th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. require 'starling'
  2. starling = Starling.new('127.0.0.1:22122')
  3. starling.set('my_queue', 12345)
  4.  
  5. require 'starling'
  6. loop do
  7. starling.get('my_queue') # this will block until something gets added to the queue
  8. # do stuff
  9. end
Add Comment
Please, Sign In to add comment