demarches-normaliennes/app/jobs/cron/purge_old_email_event_job.rb
Martin f4cc8078b4 amelioration(EmailEvent): purge les email_events vieux de plus de un mois
Update app/models/email_event.rb

Co-authored-by: Colin Darie <colin@darie.eu>

Update app/jobs/cron/purge_old_email_event_job.rb

Co-authored-by: Colin Darie <colin@darie.eu>
2023-02-06 10:35:57 +01:00

7 lines
161 B
Ruby

class Cron::PurgeOldEmailEventJob < Cron::CronJob
self.schedule_expression = "every week at 3:00"
def perform
EmailEvent.outdated.destroy_all
end
end