add post count estimates for bulk update requests

This commit is contained in:
Albert Yi
2019-01-09 15:54:55 -08:00
parent 844b1a81ba
commit f33b23d035
11 changed files with 112 additions and 17 deletions

View File

@@ -20,6 +20,10 @@ module Moderator
ModAction.log("processed mass update: #{antecedent} -> #{consequent}",:mass_update)
end
def estimate_update_count
PostReadOnly.tag_match(antecedent).count
end
def migrate_posts(normalized_antecedent, normalized_consequent)
::Post.tag_match(normalized_antecedent.join(" ")).find_each do |post|
post.reload