Created
August 16, 2012 14:36
-
-
Save rabidpraxis/3370582 to your computer and use it in GitHub Desktop.
Queue service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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