From 6b87c290cb6c981f74d2a875b8963e587ebde8c4 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 8 Mar 2023 15:31:10 +0100 Subject: [PATCH] fix(cron): PurgeOldEmailEvent in batches --- app/jobs/cron/purge_old_email_event_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/cron/purge_old_email_event_job.rb b/app/jobs/cron/purge_old_email_event_job.rb index b748a0fea..5de61c5c0 100644 --- a/app/jobs/cron/purge_old_email_event_job.rb +++ b/app/jobs/cron/purge_old_email_event_job.rb @@ -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