Create Redisable#redis (#9633)
* Create Redisable * Use #redis instead of Redis.current
This commit is contained in:
@ -11,6 +11,8 @@ class PotentialFriendshipTracker
|
||||
}.freeze
|
||||
|
||||
class << self
|
||||
include Redisable
|
||||
|
||||
def record(account_id, target_account_id, action)
|
||||
return if account_id == target_account_id
|
||||
|
||||
@ -31,11 +33,5 @@ class PotentialFriendshipTracker
|
||||
return [] if account_ids.empty?
|
||||
Account.searchable.where(id: account_ids)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def redis
|
||||
Redis.current
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user