mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
MessageBus handles readonly redis now, no need to wrap it
This commit is contained in:
parent
1c7fa956dc
commit
803feefd54
29 changed files with 111 additions and 140 deletions
|
@ -51,7 +51,7 @@ class DistributedCache
|
|||
return if @subscribed
|
||||
@lock.synchronize do
|
||||
return if @subscribed
|
||||
DiscourseBus.subscribe(channel_name) do |message|
|
||||
MessageBus.subscribe(channel_name) do |message|
|
||||
@lock.synchronize do
|
||||
process_message(message)
|
||||
end
|
||||
|
@ -63,7 +63,7 @@ class DistributedCache
|
|||
def self.publish(hash, message)
|
||||
message[:origin] = hash.identity
|
||||
message[:hash_key] = hash.key
|
||||
DiscourseBus.publish(channel_name, message, { user_ids: [-1] })
|
||||
MessageBus.publish(channel_name, message, { user_ids: [-1] })
|
||||
end
|
||||
|
||||
def self.set(hash, key, value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue