diff options
Diffstat (limited to 'app/services/users/migrate_to_ghost_user_service.rb')
-rw-r--r-- | app/services/users/migrate_to_ghost_user_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/users/migrate_to_ghost_user_service.rb b/app/services/users/migrate_to_ghost_user_service.rb index 604b83f621f..3eb220c0e40 100644 --- a/app/services/users/migrate_to_ghost_user_service.rb +++ b/app/services/users/migrate_to_ghost_user_service.rb @@ -100,9 +100,9 @@ module Users end # rubocop:disable CodeReuse/ActiveRecord - def batched_migrate(base_scope, column) + def batched_migrate(base_scope, column, batch_size: 50) loop do - update_count = base_scope.where(column => user.id).limit(100).update_all(column => ghost_user.id) + update_count = base_scope.where(column => user.id).limit(batch_size).update_all(column => ghost_user.id) break if update_count == 0 end end |