Class: RailsServerMonitor::Cleanup

Inherits:
Object
  • Object
show all
Defined in:
app/services/rails_server_monitor/cleanup.rb

Instance Method Summary collapse

Instance Method Details

#callObject



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

#configObject



10
11
12
# File 'app/services/rails_server_monitor/cleanup.rb', line 10

def config
  RailsServerMonitor.config
end