Class: UnicornStatus::Activity

Inherits:
Object
  • Object
show all
Defined in:
lib/unicorn_status.rb

Class Method Summary collapse

Class Method Details

.stat(socket) ⇒ Object



5
6
7
8
9
10
# File 'lib/unicorn_status.rb', line 5

def self.stat(socket)
  Raindrops::Linux.unix_listener_stats([socket]).each do |addr, stats|
    header = "Active Requests         Queued Requests"
    stats.active.to_s + stats.queued.to_s.rjust(header.length - stats.active.to_s.length)
  end
end