blob: 3a16ace60bdd6e2414f9fa7484c2f60fe950f25f (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
namespace :gitlab do
namespace :users do
desc "GitLab | Clear the authentication token for all users"
task clear_all_authentication_tokens: :environment do |t, args|
# Do small batched updates because these updates will be slow and locking
User.select(:id).find_in_batches(batch_size: 100) do |batch|
User.where(id: batch.map(&:id)).update_all(authentication_token: nil)
end
end
end
end
|