Skip to content

Instantly share code, notes, and snippets.

@rabidpraxis
Created August 16, 2012 14:36
Show Gist options
  • Save rabidpraxis/3370582 to your computer and use it in GitHub Desktop.
Save rabidpraxis/3370582 to your computer and use it in GitHub Desktop.
Queue service
class Service
def initialize(opts={})
end
def start
Thread.new do
until @done
queue = TorqueBox::Messaging::Queue.new('/queue/something')
if response = queue.receive
p "edit response"
end
end
end
end
def stop
@done = true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment