mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +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:
@ -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
|
||||
|
Reference in New Issue
Block a user