Skip to content

Commit

Permalink
fix: Updated the unicorn_tcp fork behavior
Browse files Browse the repository at this point in the history
Updated the unicorn_tcp before_fork and after_fork behaviors to be consistent with mongodb documentation.
  • Loading branch information
Ardiea committed Mar 21, 2023
1 parent 249e461 commit 08e898b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/unicorn_tcp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@

after_fork do |server, worker|
::Mongoid.default_client.close
::Mongoid.default_client.reconnect
end

before_fork do |server, worker|
::Mongoid.disconnect_clients
end

0 comments on commit 08e898b

Please sign in to comment.