Commit e6630845 by Jim Abramson

Merge pull request #93 from edx/jsa/fix-reinstate-disconnect

reinstate disconnection from mongo in unicorn master thread
parents bd9ef182 30945ddf
...@@ -5,3 +5,7 @@ preload_app true ...@@ -5,3 +5,7 @@ preload_app true
data_dir = ENV['DATA_DIR'] || Dir.tmpdir data_dir = ENV['DATA_DIR'] || Dir.tmpdir
listen "unix:#{data_dir}/forum.sock", :backlog => 512 listen "unix:#{data_dir}/forum.sock", :backlog => 512
pid "#{data_dir}/forum_unicorn.pid" pid "#{data_dir}/forum_unicorn.pid"
after_fork do |server, worker|
::Mongoid.default_session.disconnect
end
...@@ -9,3 +9,7 @@ listen "#{listen_host}:#{listen_port}", :tcp_nopush => true, :backlog => 512 ...@@ -9,3 +9,7 @@ listen "#{listen_host}:#{listen_port}", :tcp_nopush => true, :backlog => 512
data_dir = ENV['DATA_DIR'] || Dir.tmpdir data_dir = ENV['DATA_DIR'] || Dir.tmpdir
pid "#{data_dir}/forum_unicorn.pid" pid "#{data_dir}/forum_unicorn.pid"
after_fork do |server, worker|
::Mongoid.default_session.disconnect
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment