diff options
Diffstat (limited to 'lib/gitlab/background_migration/expire_o_auth_tokens.rb')
-rw-r--r-- | lib/gitlab/background_migration/expire_o_auth_tokens.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/expire_o_auth_tokens.rb b/lib/gitlab/background_migration/expire_o_auth_tokens.rb index 595e4ac9dc8..08bcdb8a789 100644 --- a/lib/gitlab/background_migration/expire_o_auth_tokens.rb +++ b/lib/gitlab/background_migration/expire_o_auth_tokens.rb @@ -4,9 +4,10 @@ module Gitlab module BackgroundMigration # Add expiry to all OAuth access tokens class ExpireOAuthTokens < ::Gitlab::BackgroundMigration::BatchedMigrationJob + operation_name :update_oauth_tokens + def perform each_sub_batch( - operation_name: :update_oauth_tokens, batching_scope: ->(relation) { relation.where(expires_in: nil) } ) do |sub_batch| update_oauth_tokens(sub_batch) |