2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-11-13 14:34:53 +01:00
|
|
|
class Cron::PurgeStaleExportsJob < Cron::CronJob
|
2020-04-01 15:26:46 +02:00
|
|
|
self.schedule_expression = "every 5 minutes"
|
2019-11-27 14:56:08 +01:00
|
|
|
|
|
|
|
def perform
|
2022-07-07 18:15:48 +02:00
|
|
|
Export.stale(Export::MAX_DUREE_CONSERVATION_EXPORT).destroy_all
|
2022-07-27 10:23:21 +02:00
|
|
|
Export.stuck(Export::MAX_DUREE_GENERATION).destroy_all
|
2019-11-27 14:56:08 +01:00
|
|
|
end
|
|
|
|
end
|