FIX: importer performance of update_tl0, and give feedback during vanilla_mysql's create_permalinks

This commit is contained in:
Neil Lalonde
2016-07-06 10:58:43 -04:00
parent 2facb6190f
commit 3b119dac6d
2 changed files with 4 additions and 2 deletions

View File

@ -705,9 +705,9 @@ class ImportScripts::Base
total_count = User.count
progress_count = 0
User.find_each do |user|
User.includes(:user_stat).find_each do |user|
begin
user.change_trust_level!(0) if Post.where(user_id: user.id).count == 0
user.update_columns(trust_level: 0) if user.trust_level > 0 && user.post_count == 0
rescue Discourse::InvalidAccess
nil
end