Class: RailsServerMonitor::Cleanup
- Inherits:
-
Object
- Object
- RailsServerMonitor::Cleanup
- Defined in:
- app/services/rails_server_monitor/cleanup.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 |
# File 'app/services/rails_server_monitor/cleanup.rb', line 5 def call RailsServerMonitor::ServerSnapshot.where("created_at < ?", Time.zone.now - config.cleanup_snapshots_after) .delete_all end |
#config ⇒ Object
10 11 12 |
# File 'app/services/rails_server_monitor/cleanup.rb', line 10 def config RailsServerMonitor.config end |