Class: Appcast::StatsHandler
- Inherits:
-
BaseHandler
- Object
- Mongrel::HttpHandler
- BaseHandler
- Appcast::StatsHandler
- Defined in:
- lib/appcast/handlers.rb
Overview
Stats handler which just displays some basic stats on whats going on in the server
Constant Summary collapse
- LINES =
"%-30s %-8s\n"
Instance Method Summary collapse
Methods inherited from BaseHandler
Constructor Details
This class inherits a constructor from Appcast::BaseHandler
Instance Method Details
#process(request, response) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/appcast/handlers.rb', line 29 def process(request, response) pre_process response.start do |h, out| h['Content-Type'] = 'text/plain' @guard.synchronize do Message.stats.each do |k, v| out.write(LINES % [k.strip, v]) end end end end |