From bcfff65195f557dc086470f91b4c90b15c004cf7 Mon Sep 17 00:00:00 2001 From: ysksn Date: Sun, 3 Feb 2019 03:11:38 +0900 Subject: Create Redisable#redis (#9633) * Create Redisable * Use #redis instead of Redis.current --- app/lib/potential_friendship_tracker.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'app/lib/potential_friendship_tracker.rb') diff --git a/app/lib/potential_friendship_tracker.rb b/app/lib/potential_friendship_tracker.rb index 017a9748d..188aa4a27 100644 --- a/app/lib/potential_friendship_tracker.rb +++ b/app/lib/potential_friendship_tracker.rb @@ -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 -- cgit