mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
@@ -10,10 +10,7 @@ end
|
||||
if defined?(PhusionPassenger)
|
||||
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
||||
if forked
|
||||
# We're in smart spawning mode.
|
||||
$redis = DiscourseRedis.new
|
||||
Discourse::Application.config.cache_store.reconnect
|
||||
MessageBus.after_fork
|
||||
Discourse.after_fork
|
||||
else
|
||||
# We're in conservative spawning mode. We don't need to do anything.
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user