Expand description
Analytics retention — delete events older than N days. Run per tenant at boot (servers restart/redeploy regularly).
Constants§
- DEFAULT_
RETENTION_ DAYS - Default retention window when the tenant hasn’t configured one.
Functions§
- prune
- Delete events older than
days.days <= 0is a no-op (never wipe the whole table implicitly). - retention_
days - Resolve the retention window from the
"analytics"SiteSettingscope (retention_days), falling back toDEFAULT_RETENTION_DAYS.