From 85580ce34ee58a4e0187ec558fdbc91432cea363 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 26 Feb 2020 17:44:06 +0100 Subject: [PATCH] rename SeekAndDestroyExpiredDossiersJob to ExpiredDossiersDeletionJob --- app/jobs/expired_dossiers_deletion_job.rb | 7 +++++++ app/jobs/seek_and_destroy_expired_dossiers_job.rb | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 app/jobs/expired_dossiers_deletion_job.rb delete mode 100644 app/jobs/seek_and_destroy_expired_dossiers_job.rb diff --git a/app/jobs/expired_dossiers_deletion_job.rb b/app/jobs/expired_dossiers_deletion_job.rb new file mode 100644 index 000000000..65e478192 --- /dev/null +++ b/app/jobs/expired_dossiers_deletion_job.rb @@ -0,0 +1,7 @@ +class ExpiredDossiersDeletionJob < ApplicationJob + queue_as :cron + + def perform(*args) + ExpiredDossiersDeletionService.process_dossiers_brouillon + end +end diff --git a/app/jobs/seek_and_destroy_expired_dossiers_job.rb b/app/jobs/seek_and_destroy_expired_dossiers_job.rb deleted file mode 100644 index d720873bf..000000000 --- a/app/jobs/seek_and_destroy_expired_dossiers_job.rb +++ /dev/null @@ -1,8 +0,0 @@ -class SeekAndDestroyExpiredDossiersJob < ApplicationJob - queue_as :cron - - def perform(*args) - Dossier.send_brouillon_expiration_notices - Dossier.destroy_brouillons_and_notify - end -end