fix(job): Cron::ExpiredDossiersDeletionJob destroy brouillon expired in batch
This commit is contained in:
parent
6a2a7fa2d0
commit
520142a9c6
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class ExpiredDossiersDeletionService
|
||||||
user_notifications = group_by_user_email(Dossier.brouillon_expired)
|
user_notifications = group_by_user_email(Dossier.brouillon_expired)
|
||||||
.map { |(email, dossiers)| [email, dossiers.map(&:hash_for_deletion_mail)] }
|
.map { |(email, dossiers)| [email, dossiers.map(&:hash_for_deletion_mail)] }
|
||||||
|
|
||||||
Dossier.brouillon_expired.destroy_all
|
Dossier.brouillon_expired.in_batches.destroy_all
|
||||||
|
|
||||||
user_notifications.each do |(email, dossiers_hash)|
|
user_notifications.each do |(email, dossiers_hash)|
|
||||||
DossierMailer.notify_brouillon_deletion(
|
DossierMailer.notify_brouillon_deletion(
|
||||||
|
|
Loading…
Reference in a new issue