reinstate disconnection from mongo in unicorn master thread
e61430d943
was inadvertently lost in a recent change, this puts it back.
This commit is contained in:
Родитель
bd9ef1822d
Коммит
30945ddf9d
|
@ -5,3 +5,7 @@ preload_app true
|
|||
data_dir = ENV['DATA_DIR'] || Dir.tmpdir
|
||||
listen "unix:#{data_dir}/forum.sock", :backlog => 512
|
||||
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
|
|||
|
||||
data_dir = ENV['DATA_DIR'] || Dir.tmpdir
|
||||
pid "#{data_dir}/forum_unicorn.pid"
|
||||
|
||||
after_fork do |server, worker|
|
||||
::Mongoid.default_session.disconnect
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче