MessageBus handles readonly redis now, no need to wrap it

This commit is contained in:
Sam
2015-05-04 12:21:00 +10:00
parent 1c7fa956dc
commit 803feefd54
29 changed files with 111 additions and 140 deletions

View File

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