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:
Sam
2014-03-28 13:48:14 +11:00
parent 956b14a4ab
commit f3cc7360e0
8 changed files with 23 additions and 27 deletions

View File

@ -179,6 +179,10 @@ module SiteSettingExtension
@@process_id ||= SecureRandom.uuid
end
def after_fork
@@process_id = nil
end
def remove_override!(name)
provider.destroy(name)
current[name] = defaults[name]