In the index task, mute the debug logger once per batch instead of once per iteation.
parent
9ab5a3fca4
commit
00bc2e6072
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue