diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-29 18:10:14 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-29 20:59:44 -0700 |
commit | df58b5249c3e17ee4fab448224e3f043a2444fa0 (patch) | |
tree | 4ff14e4a8590d0487dc230d34fa50f518c8df8a3 /lib/unicorn/configurator.rb | |
parent | f65783b5a107fb515b46b17998b276d0fafd4be1 (diff) | |
download | unicorn-df58b5249c3e17ee4fab448224e3f043a2444fa0.tar.gz |
We still need to support "listeners" for easy use of command-line options, but folks using the config file should use "listen" as it is more flexible.
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 4a085a1..a69e971 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -8,7 +8,8 @@ module Unicorn # # Example (when used with the unicorn config file): # worker_processes 4 - # listeners %w(0.0.0.0:9292 /tmp/my_app.sock) + # listen '/tmp/my_app.sock', :backlog => 1 + # listen '0.0.0.0:9292' # timeout 10 # pid "/tmp/my_app.pid" # after_fork do |server,worker_nr| @@ -23,7 +24,7 @@ module Unicorn # Default settings for Unicorn DEFAULTS = { :timeout => 60, - :listeners => [ Const::DEFAULT_LISTEN ], + :listeners => [], :logger => DEFAULT_LOGGER, :worker_processes => 1, :after_fork => lambda { |server, worker_nr| @@ -153,7 +154,9 @@ module Unicorn # sets listeners to the given +addresses+, replacing or augmenting the # current set. This is for the global listener pool shared by all # worker processes. For per-worker listeners, see the after_fork example - def listeners(addresses) + # This is for internal API use only, do not use it in your Unicorn + # config file. Use listen instead. + def listeners(addresses) # :nodoc: Array === addresses or addresses = Array(addresses) addresses.map! { |addr| expand_addr(addr) } @set[:listeners] = addresses |