2021-04-29 17:29:47 +02:00
|
|
|
class Cron::PurgeStaleArchivesJob < Cron::CronJob
|
|
|
|
self.schedule_expression = "every 5 minutes"
|
|
|
|
|
|
|
|
def perform
|
2022-07-07 18:15:48 +02:00
|
|
|
Archive.stale(Archive::RETENTION_DURATION).destroy_all
|
2021-04-29 17:29:47 +02:00
|
|
|
end
|
|
|
|
end
|