Change algorithm of follow recommendations (#28314)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
b7bdcd4f39
commit
b5ac61b2c5
35 changed files with 297 additions and 292 deletions
|
@ -11,19 +11,5 @@
|
|||
#
|
||||
|
||||
class FollowRecommendationSuppression < ApplicationRecord
|
||||
include Redisable
|
||||
|
||||
belongs_to :account
|
||||
|
||||
after_commit :remove_follow_recommendations, on: :create
|
||||
|
||||
private
|
||||
|
||||
def remove_follow_recommendations
|
||||
redis.pipelined do |pipeline|
|
||||
I18n.available_locales.each do |locale|
|
||||
pipeline.zrem("follow_recommendations:#{locale}", account_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue