prune older than 2 years instead of 12 months

This commit is contained in:
Jeremy Watson 2018-10-05 13:22:58 +00:00
parent 33c663ae1d
commit 8f6a1f143d
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class PruneOldEventsWorker
'(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where(
'created_at < ?',
(12.months + 1.day).ago)
(2.years + 1.day).ago)
.select(:id)
.limit(10_000))
.delete_all