diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-07 20:09:50 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-07 20:12:22 -0800 |
commit | 7d07c36f1da30af054d78deed5e87f29832d6f6b (patch) | |
tree | 5b466654f6439dffc751889f624124d9121827cc /lib/rainbows/rev/core.rb | |
parent | 31fe6e621ac3d84a091b468f26118d2226716e9b (diff) | |
download | rainbows-7d07c36f1da30af054d78deed5e87f29832d6f6b.tar.gz |
It'll make development of future ev_core-derived things easier, hopefully.
Diffstat (limited to 'lib/rainbows/rev/core.rb')
-rw-r--r-- | lib/rainbows/rev/core.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rainbows/rev/core.rb b/lib/rainbows/rev/core.rb index 0d1add5..0460137 100644 --- a/lib/rainbows/rev/core.rb +++ b/lib/rainbows/rev/core.rb @@ -20,6 +20,7 @@ module Rainbows end # class Server module Core + include Base # runs inside each forked worker, this sits around and waits # for connections and doesn't die until the parent dies (or is @@ -27,10 +28,9 @@ module Rainbows def worker_loop(worker) init_worker_process(worker) mod = self.class.const_get(@use) - client = mod.const_get(:Client) - client.const_set(:APP, G.server.app) - Server.const_set(:MAX, G.server.worker_connections) - Server.const_set(:CL, client) + Server.const_set(:MAX, @worker_connections) + Server.const_set(:CL, mod.const_get(:Client)) + EvCore.setup(EvCore) rloop = ::Rev::Loop.default Heartbeat.new(1, true).attach(rloop) LISTENERS.map! { |s| Server.new(s).attach(rloop) } |