Created
October 1, 2008 19:58
-
-
Save vanpelt/14174 to your computer and use it in GitHub Desktop.
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
thin start --threaded | |
class GeneralController < ApplicationController | |
def queue_size | |
stuff = "" | |
cur = Thread.current | |
MQ.new.queue(params[:id] || 'crawls').status do |messages, consumers| | |
stuff = "#{messages} messages and #{consumers} consumers in #{params[:id] || 'crawls'}" | |
cur.wakeup | |
end | |
Thread.stop | |
render :text => stuff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment