Add a setting for maximum age of events

This commit is contained in:
Dan Milne
2025-11-17 16:17:59 +11:00
parent 830810305b
commit 5d3e35a4ac
5 changed files with 42 additions and 17 deletions

View File

@@ -15,4 +15,9 @@ class Setting < ApplicationRecord
def self.ipapi_key
get('ipapi_key', ENV['IPAPI_KEY'])
end
# Convenience method for event retention days (default: 90 days)
def self.event_retention_days
get('event_retention_days', '90').to_i
end
end