prune older than 2 years instead of 12 months
This commit is contained in:
parent
33c663ae1d
commit
8f6a1f143d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue