reload the page when read_only mode is disabled

This commit is contained in:
Régis Hanol
2014-02-14 00:27:25 +01:00
parent 41d16a3657
commit a8b3269fdb
3 changed files with 14 additions and 9 deletions

View File

@ -149,9 +149,13 @@ module BackupRestore
end
def self.after_fork
# reconnect to redis
$redis.client.reconnect
# reconnect the rails cache (uses redis)
Rails.cache.reconnect
# tells the message we've forked
MessageBus.after_fork
# /!\ HACK /!\ force sidekiq to create a new connection to redis
Sidekiq.instance_variable_set(:@redis, nil)
end