diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-05 17:06:20 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-06 07:17:19 +0000 |
commit | 6bde32081338ce8075854f4c47ce8ca5347df919 (patch) | |
tree | 71759032be458838eb33f7951172e8572aec4b6d /lib/rainbows/base.rb | |
parent | d6e4975937a9590f48dc39b1a4aefa9d62f34616 (diff) | |
download | rainbows-6bde32081338ce8075854f4c47ce8ca5347df919.tar.gz |
Code organization is hard :<
Diffstat (limited to 'lib/rainbows/base.rb')
-rw-r--r-- | lib/rainbows/base.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 5d56063..b94ddc9 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -8,16 +8,13 @@ module Rainbows::Base # :stopdoc: - # shortcuts... - G = Rainbows::G - # this method is called by all current concurrency models def init_worker_process(worker) # :nodoc: super(worker) Rainbows::Response.setup(self.class) Rainbows::MaxBody.setup Rainbows::RackInput.setup - G.tmp = worker.tmp + Rainbows.tick_io = worker.tmp listeners = Rainbows::HttpServer::LISTENERS Rainbows::HttpServer::IO_PURGATORY.concat(listeners) @@ -26,9 +23,9 @@ module Rainbows::Base # since we don't defer reopening logs Rainbows::HttpServer::SELF_PIPE.each { |x| x.close }.clear trap(:USR1) { reopen_worker_logs(worker.nr) } - trap(:QUIT) { G.quit! } + trap(:QUIT) { Rainbows.quit! } [:TERM, :INT].each { |sig| trap(sig) { exit!(0) } } # instant shutdown - Rainbows::ProcessClient.const_set(:APP, G.server.app) + Rainbows::ProcessClient.const_set(:APP, Rainbows.server.app) logger.info "Rainbows! #@use worker_connections=#@worker_connections" end @@ -38,7 +35,6 @@ module Rainbows::Base def self.included(klass) # :nodoc: klass.const_set :LISTENERS, Rainbows::HttpServer::LISTENERS - klass.const_set :G, Rainbows::G end # :startdoc: |