From 4beeb52b1c52ea4486dea13cebe2a8438a9f2139 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Jun 2011 01:10:07 +0000 Subject: memory reductions in worker process There's absolutely no need to keep the OptionParser around in worker processes. --- lib/unicorn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index f9aa73a..9349e49 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -31,9 +31,9 @@ module Unicorn # app (which we defer based on the outcome of "preload_app" in the # Unicorn config). The returned lambda will be called when it is # time to build the app. - def self.builder(ru, opts) + def self.builder(ru, op) # allow Configurator to parse cli switches embedded in the ru file - Unicorn::Configurator::RACKUP.update(:file => ru, :optparse => opts) + op = Unicorn::Configurator::RACKUP.merge!(:file => ru, :optparse => op) # always called after config file parsing, may be called after forking lambda do || -- cgit v1.2.3-24-ge0c7