2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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
|
2022-07-27 10:32:54 +02:00
|
|
|
Archive.stuck(Archive::MAX_DUREE_GENERATION).destroy_all
|
2021-04-29 17:29:47 +02:00
|
|
|
end
|
|
|
|
end
|