Commit 8f6a1f14 authored by Jeremy Watson's avatar Jeremy Watson

prune older than 2 years instead of 12 months

parent 33c663ae
...@@ -13,7 +13,7 @@ class PruneOldEventsWorker ...@@ -13,7 +13,7 @@ class PruneOldEventsWorker
'(id IN (SELECT id FROM (?) ids_to_remove))', '(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where( Event.unscoped.where(
'created_at < ?', 'created_at < ?',
(12.months + 1.day).ago) (2.years + 1.day).ago)
.select(:id) .select(:id)
.limit(10_000)) .limit(10_000))
.delete_all .delete_all
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment