diff options
-rw-r--r-- | lib/tasks/monsterfork.rake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake index f92eb752d..f36cc3915 100644 --- a/lib/tasks/monsterfork.rake +++ b/lib/tasks/monsterfork.rake @@ -8,9 +8,11 @@ namespace :monsterfork do Status.find_in_batches do |statuses| ActiveRecord::Base.logger.info("Indexing status #{1+i} of #{total}.") - i += statuses.count - statuses.each do |s| - ActiveRecord::Base.logger.silence { s.update_column(:normalized_text, normalize_status(s)) } + ActiveRecord::Base.logger.silence do + i += statuses.count + statuses.each do |s| + s.update_column(:normalized_text, normalize_status(s)) + end end end end |