mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:33:51 +08:00
FIX: upgrade resilient distributed cache
only load messages in distributed cache if discourse version matches
This commit is contained in:
parent
df5be88a77
commit
17d843a0ad
|
@ -26,6 +26,7 @@ class DistributedCache
|
|||
|
||||
next if payload["origin"] == current.identity
|
||||
next if current.key != payload["hash_key"]
|
||||
next if payload["discourse_version"] != Discourse.git_version
|
||||
|
||||
hash = current.hash(message.site_id)
|
||||
|
||||
|
@ -63,6 +64,7 @@ class DistributedCache
|
|||
def self.publish(hash, message)
|
||||
message[:origin] = hash.identity
|
||||
message[:hash_key] = hash.key
|
||||
message[:discourse_version] = Discourse.git_version
|
||||
MessageBus.publish(channel_name, message, { user_ids: [-1] })
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user