Class: DeleteOldTransactionsJob
- Inherits:
-
Object
- Object
- DeleteOldTransactionsJob
- Includes:
- SentryLogging, Sidekiq::Job
- Defined in:
- app/sidekiq/delete_old_transactions_job.rb
Instance Method Summary collapse
-
#perform ⇒ Object
:nocov:.
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Instance Method Details
#perform ⇒ Object
:nocov:
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/sidekiq/delete_old_transactions_job.rb', line 8 def perform AsyncTransaction::Base .stale .find_each do |tx| tx.destroy! rescue ActiveRecord::RecordNotDestroyed => e ( 'DeleteOldTransactionsJob raised an exception', :info, model: self.class.to_s, transaction_id: tx.id, exception: e. ) end end |