[deploy] Bug Fix:Remove More ReadingList Index Code (#10439)
This commit is contained in:
parent
fb707621d0
commit
9eb0833134
2 changed files with 2 additions and 18 deletions
|
|
@ -37,7 +37,7 @@ module Users
|
|||
|
||||
def delete_profile_info(user)
|
||||
user.notifications.delete_all
|
||||
remove_reactions(user)
|
||||
user.reactions.delete_all
|
||||
user.follows.delete_all
|
||||
Follow.followable_user(user.id).delete_all
|
||||
user.messages.delete_all
|
||||
|
|
@ -49,13 +49,5 @@ module Users
|
|||
user.organization_memberships.delete_all
|
||||
user.profile_pins.delete_all
|
||||
end
|
||||
|
||||
def remove_reactions(user)
|
||||
readinglist_ids = user.reactions.readinglist.ids
|
||||
user.reactions.delete_all
|
||||
readinglist_ids.each do |id|
|
||||
Search::RemoveFromIndexWorker.perform_async("Search::Reaction", id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ module Users
|
|||
|
||||
virtual_articles = user.articles.map { |article| Article.new(article.attributes) }
|
||||
user.articles.find_each do |article|
|
||||
remove_reactions(article)
|
||||
article.reactions.delete_all
|
||||
article.buffer_updates.delete_all
|
||||
article.comments.includes(:user).find_each do |comment|
|
||||
comment.reactions.delete_all
|
||||
|
|
@ -24,13 +24,5 @@ module Users
|
|||
cache_buster.bust_article(article)
|
||||
end
|
||||
end
|
||||
|
||||
def remove_reactions(article)
|
||||
readinglist_ids = article.reactions.readinglist.ids
|
||||
article.reactions.delete_all
|
||||
readinglist_ids.each do |id|
|
||||
Search::RemoveFromIndexWorker.perform_async("Search::Reaction", id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue