mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: Avoid publishing a gigantic payload.
* Certain sites have way too many categories.
This commit is contained in:
parent
996ce8c443
commit
ed851dbfff
4 changed files with 33 additions and 5 deletions
|
@ -296,12 +296,16 @@ module Discourse
|
|||
last_read_only[$redis.namespace] = nil
|
||||
end
|
||||
|
||||
def self.request_refresh!
|
||||
def self.request_refresh!(user_ids: nil)
|
||||
# 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'
|
||||
if user_ids
|
||||
MessageBus.publish("/refresh_client", 'clobber', user_ids: user_id)
|
||||
else
|
||||
MessageBus.publish('/global/asset-version', 'clobber')
|
||||
end
|
||||
end
|
||||
|
||||
def self.git_version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue