mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Refresh the site after updating certain site settings
This commit is contained in:
parent
b3a860027f
commit
ccd3e635d2
9 changed files with 29 additions and 6 deletions
|
@ -172,6 +172,14 @@ module Discourse
|
|||
!!$redis.get(readonly_mode_key)
|
||||
end
|
||||
|
||||
def self.request_refresh!
|
||||
# Causes refresh on next click for all clients
|
||||
#
|
||||
# This is better than `MessageBus.publish "/file-change", ["refresh"]` because
|
||||
# it spreads the refreshes out over a time period
|
||||
MessageBus.publish '/global/asset-version', 'clobber'
|
||||
end
|
||||
|
||||
def self.git_version
|
||||
return $git_version if $git_version
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue