Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads * Fix tests
This commit is contained in:
parent
9bf04db23a
commit
3917353645
44 changed files with 243 additions and 124 deletions
|
@ -19,6 +19,7 @@ class EncryptedMessage < ApplicationRecord
|
|||
self.inheritance_column = nil
|
||||
|
||||
include Paginable
|
||||
include Redisable
|
||||
|
||||
scope :up_to, ->(id) { where(arel_table[:id].lteq(id)) }
|
||||
|
||||
|
@ -38,7 +39,7 @@ class EncryptedMessage < ApplicationRecord
|
|||
end
|
||||
|
||||
def subscribed_to_timeline?
|
||||
Redis.current.exists?("subscribed:#{streaming_channel}")
|
||||
redis.exists?("subscribed:#{streaming_channel}")
|
||||
end
|
||||
|
||||
def streaming_channel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue