From 87b792445e5e38291fc50b6c3b825a63e9adf130 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 30 Apr 2010 00:47:28 +0000 Subject: add global Unicorn.listener_names method This is useful as a :listeners argument when setting up Raindrops::Middleware (http://raindrops.bogomips.org/), as it can be done automatically. --- lib/unicorn.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 72cda10..14e0e52 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -78,6 +78,13 @@ module Unicorn end end end + + # returns an array of strings representing TCP listen socket addresses + # and Unix domain socket paths. This is useful for use with + # Raindrops::Middleware under Linux: http://raindrops.bogomips.org/ + def listener_names + HttpServer::LISTENERS.map { |io| SocketHelper.sock_name(io) } + end end # This is the process manager of Unicorn. This manages worker -- cgit v1.2.3-24-ge0c7