Class: EVSS::DeleteOldClaims

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/sidekiq/evss/delete_old_claims.rb

Instance Method Summary collapse

Instance Method Details

#performObject



9
10
11
12
13
14
# File 'app/sidekiq/evss/delete_old_claims.rb', line 9

def perform
  Sentry.set_tags(source: 'claims-status')
  claims = EVSSClaim.where('updated_at < ?', 1.day.ago)
  logger.info("Deleting #{claims.count} old EVSS claims")
  claims.delete_all
end