Class: Tnw::Metrics::RetentionJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Tnw::Metrics::RetentionJob
- Defined in:
- app/jobs/tnw/metrics/retention_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(now: Time.current) ⇒ Object
4 5 6 7 |
# File 'app/jobs/tnw/metrics/retention_job.rb', line 4 def perform(now: Time.current) cutoff = now - Tnw.configuration.metrics_retention Tnw::MetricSample.where(collected_at: ...cutoff).delete_all end |