diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-07 17:42:47 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-07 17:42:47 -0800 |
commit | 31fe6e621ac3d84a091b468f26118d2226716e9b (patch) | |
tree | 8f84013a69457d481f5b1a41fb07db2989b6d0e3 | |
parent | 129473b7c69e08b23825a2b067ccd9860cea797e (diff) | |
download | rainbows-31fe6e621ac3d84a091b468f26118d2226716e9b.tar.gz |
It's already global...
-rw-r--r-- | lib/rainbows/base.rb | 1 | ||||
-rw-r--r-- | lib/rainbows/http_server.rb | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 9b50d9a..04725f0 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -26,7 +26,6 @@ module Rainbows def init_worker_process(worker) super(worker) - G.server = self G.tmp = worker.tmp # we're don't use the self-pipe mechanism in the Rainbows! worker diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index 7935105..0d34d40 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -5,16 +5,14 @@ module Rainbows class HttpServer < ::Unicorn::HttpServer include Rainbows - @@instance = nil - class << self def setup(block) - @@instance.instance_eval(&block) + G.server.instance_eval(&block) end end def initialize(app, options) - @@instance = self + G.server = self rv = super(app, options) defined?(@use) or use(:Base) @worker_connections ||= MODEL_WORKER_CONNECTIONS[@use] |