Sha256: 69be01dcc1322cf7b615bad8b964344098ab58a16f1ac091b771db1c015c5689

Contents?: true

Size: 325 Bytes

Versions: 9

Compression:

Stored size: 325 Bytes

Contents

# frozen_string_literal: true

module RailsServerMonitor
  class Cleanup
    def call
      RailsServerMonitor::ServerSnapshot.where("created_at < ?", Time.zone.now - config.cleanup_snapshots_after)
                                        .delete_all
    end

    def config
      RailsServerMonitor.config
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails-server-monitor-0.2.1 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.2.0 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.10 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.9 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.8 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.7 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.6 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.5 app/services/rails_server_monitor/cleanup.rb
rails-server-monitor-0.1.4 app/services/rails_server_monitor/cleanup.rb