mirror of
https://github.com/discourse/discourse.git
synced 2025-08-20 18:52:44 +08:00
BUGFIX: Correct after_fork semantics
After fork SiteSettings was not getting a new process id, causing site settings not to refresh properly in unicorn This code also centralizes the logic
This commit is contained in:
parent
956b14a4ab
commit
f3cc7360e0
8 changed files with 23 additions and 27 deletions
|
@ -118,11 +118,7 @@ class Demon::Base
|
|||
end
|
||||
|
||||
def establish_app
|
||||
ActiveRecord::Base.connection_handler.clear_active_connections!
|
||||
ActiveRecord::Base.establish_connection
|
||||
$redis.client.reconnect
|
||||
Rails.cache.reconnect
|
||||
MessageBus.after_fork
|
||||
Discourse.after_fork
|
||||
|
||||
Signal.trap("HUP") do
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue