Class: Gitlab::BackgroundOperation::UsersDeleteUnconfirmedSecondaryEmails

Inherits:
BaseOperationWorker
  • Object
show all
Defined in:
lib/gitlab/background_operation/users_delete_unconfirmed_secondary_emails.rb

Constant Summary

Constants inherited from BaseOperationWorker

BaseOperationWorker::DEFAULT_FEATURE_CATEGORY, BaseOperationWorker::MINIMUM_PAUSE_MS

Constants included from Database::DynamicModelHelpers

Database::DynamicModelHelpers::BATCH_SIZE

Instance Method Summary collapse

Methods inherited from BaseOperationWorker

#batch_metrics, cursor, cursor?, cursor_columns, feature_category, #initialize, job_arguments, operation_name

Methods included from Database::DynamicModelHelpers

define_batchable_model, #each_batch, #each_batch_range

Constructor Details

This class inherits a constructor from Gitlab::BackgroundOperation::BaseOperationWorker

Instance Method Details

#performObject

rubocop:disable CodeReuse/ActiveRecord – Specific use-case



11
12
13
14
15
16
17
# File 'lib/gitlab/background_operation/users_delete_unconfirmed_secondary_emails.rb', line 11

def perform
  each_sub_batch do |sub_batch|
    sub_batch
      .where('created_at < ? AND confirmed_at IS NULL', created_cut_off)
      .delete_all
  end
end