Class: SpreeCmCommissioner::AccountDeletionCronExecutor

Inherits:
BaseInteractor
  • Object
show all
Defined in:
app/interactors/spree_cm_commissioner/account_deletion_cron_executor.rb

Instance Method Summary collapse

Instance Method Details

#callObject



3
4
5
6
7
# File 'app/interactors/spree_cm_commissioner/account_deletion_cron_executor.rb', line 3

def call
  user_soft_deleted_accounts.find_each do ||
    ()
  end
end

#delete_account_permanently(user_soft_deleted_account) ⇒ Object



14
15
16
# File 'app/interactors/spree_cm_commissioner/account_deletion_cron_executor.rb', line 14

def ()
  .really_delete
end

#user_soft_deleted_accountsObject



9
10
11
12
# File 'app/interactors/spree_cm_commissioner/account_deletion_cron_executor.rb', line 9

def user_soft_deleted_accounts
  deleted_time = 1.month.ago
  Spree::User.with_deleted.where(['deleted_at IS NOT NULL AND deleted_at < ?', deleted_time])
end