Class: CleanDeadUsers
- Inherits:
-
Object
- Object
- CleanDeadUsers
- Includes:
- Sidekiq::Worker
- Defined in:
- app/workers/clean_dead_users.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/workers/clean_dead_users.rb', line 6 def perform # users created more than a month ago that didn't confirm User .where(confirmed_at: nil) .where("created_at < NOW() - INTERVAL '30 days'") .each(&:archived!) end |