about summary refs log tree commit diff
path: root/app/models/follow_recommendation_suppression.rb
diff options
context:
space:
mode:
authorJean byroot Boussier <jean.boussier+github@shopify.com>2023-03-04 16:38:28 +0100
committerGitHub <noreply@github.com>2023-03-04 16:38:28 +0100
commit922837dc96154b0455a4cf660c3f8369c65aacb4 (patch)
tree3f2d9568a4d53fc9f8aed8ad580769a50f442a5c /app/models/follow_recommendation_suppression.rb
parentaa98c8fbeb02fecac2681464fd7c0445deb466b1 (diff)
Upgrade to latest redis-rb 4.x and fix deprecations (#23616)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Diffstat (limited to 'app/models/follow_recommendation_suppression.rb')
-rw-r--r--app/models/follow_recommendation_suppression.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/follow_recommendation_suppression.rb b/app/models/follow_recommendation_suppression.rb
index a9dbbfc18..e261a2fe3 100644
--- a/app/models/follow_recommendation_suppression.rb
+++ b/app/models/follow_recommendation_suppression.rb
@@ -20,9 +20,9 @@ class FollowRecommendationSuppression < ApplicationRecord
   private
 
   def remove_follow_recommendations
-    redis.pipelined do
+    redis.pipelined do |pipeline|
       I18n.available_locales.each do |locale|
-        redis.zrem("follow_recommendations:#{locale}", account_id)
+        pipeline.zrem("follow_recommendations:#{locale}", account_id)
       end
     end
   end