Class: CodeSunset::CleanupEventsJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- CodeSunset::CleanupEventsJob
- Defined in:
- app/jobs/code_sunset/cleanup_events_job.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
5 6 7 8 |
# File 'app/jobs/code_sunset/cleanup_events_job.rb', line 5 def perform cutoff = CodeSunset.configuration.event_retention_days.days.ago CodeSunset::Event.where("occurred_at < ?", cutoff).delete_all end |