2023-01-12 16:14:42 +01:00
|
|
|
class Cron::ExpiredPrefilledDossiersDeletionJob < Cron::CronJob
|
2023-11-07 07:26:29 +01:00
|
|
|
self.schedule_expression = Expired.schedule_at(self)
|
2023-01-12 16:14:42 +01:00
|
|
|
|
|
|
|
def perform
|
|
|
|
Dossier.prefilled.state_brouillon.where(user_id: nil, updated_at: ..5.days.ago).destroy_all
|
|
|
|
end
|
|
|
|
end
|