about summary refs log tree commit diff
path: root/app/lib/potential_friendship_tracker.rb
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2019-02-03 03:11:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-02 19:11:38 +0100
commitbcfff65195f557dc086470f91b4c90b15c004cf7 (patch)
treecdf805998758278b41cd8ab0cc8dd864d8047c57 /app/lib/potential_friendship_tracker.rb
parent6a5e3da6b044e50635d293c2716883cc5627e4c8 (diff)
Create Redisable#redis (#9633)
* Create Redisable

* Use #redis instead of Redis.current
Diffstat (limited to 'app/lib/potential_friendship_tracker.rb')
-rw-r--r--app/lib/potential_friendship_tracker.rb8
1 files changed, 2 insertions, 6 deletions
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