Refresh the site after updating certain site settings

This commit is contained in:
riking
2014-02-20 21:52:11 -08:00
parent b3a860027f
commit ccd3e635d2
9 changed files with 29 additions and 6 deletions

View File

@ -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