mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05: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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue