Skip to content

Allow config.events_retention to accept a number of records #3

@westonganger

Description

@westonganger

Would be nice if we could configure events_retention to limit to a particular number of records instead of just a time frame

Something like

# config/initializers/inner_performance.rb
InnerPerformance.config.events_retention = {
  number_of_records: 10_000
}

# app/jobs/inner_performance/cleanup_job.rb
def perform
  InnerPerformance::Event.order(created_at: :desc).offset(my_limit).destroy_all
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions