diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-02 18:48:47 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-03 11:13:33 -0800 |
commit | 56aaf96ffccebf70bf98f41c64bf533cef68f802 (patch) | |
tree | 030620cf489aa64d1d3311112e3a9f76d63b5e28 /lib/unicorn/configurator.rb | |
parent | 5517fa27191228af9ef9ee2f4491398c73b505c1 (diff) | |
download | unicorn-56aaf96ffccebf70bf98f41c64bf533cef68f802.tar.gz |
This means processes will share less memory but things should be compatible with all existing setups.
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index ebdcba6..65b29c6 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -23,6 +23,7 @@ module Unicorn :directory => nil, :pid => nil, :backlog => 1024, + :preload_app => false, } attr_reader :config_file @@ -142,6 +143,15 @@ module Unicorn @set[:directory] = path ? File.expand_path(path) : nil end + def preload_app(bool) + case bool + when TrueClass, FalseClass + @set[:preload_app] = bool + else + raise ArgumentError, "preload_app=#{bool.inspect} not a boolean" + end + end + private def set_hook(var, my_proc) #:nodoc: |