From 168bacbea266baecafe72adc1d7fa08674607744 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Mar 2010 10:20:32 +0000 Subject: support "user" directive outside of after_fork hook This is new in Unicorn 0.97.0, and makes sense to us since we don't fork. It won't work as nicely with log reopening in some cases, but it's better than nothing --- lib/zbatery.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/zbatery.rb b/lib/zbatery.rb index 6f2a474..ce542d6 100644 --- a/lib/zbatery.rb +++ b/lib/zbatery.rb @@ -125,6 +125,7 @@ module Rainbows # master == worker in our case def init_worker_process(worker) after_fork.call(self, worker) + worker.user(*user) if user.kind_of?(Array) && ! worker.switched build_app! unless preload_app logger.info "Zbatery #@use worker_connections=#@worker_connections" end -- cgit v1.2.3-24-ge0c7