mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
reload the page when read_only mode is disabled
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user