fix(cron): PurgeOldEmailEvent in batches

This commit is contained in:
Colin Darie 2023-03-08 15:31:10 +01:00
parent d20114f978
commit 6b87c290cb

View file

@ -2,6 +2,6 @@ class Cron::PurgeOldEmailEventJob < Cron::CronJob
self.schedule_expression = "every week at 3:00"
def perform
EmailEvent.outdated.destroy_all
EmailEvent.outdated.in_batches.destroy_all
end
end