From 8a42aa2117c60252ea29145b7d3f866c9a53a4f3 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 20 Jun 2023 17:46:58 +0200 Subject: [PATCH] =?UTF-8?q?correctif(dossiers.expirations):=20sur=20de=20g?= =?UTF-8?q?ros=20volumes=20de=20donn=C3=A9es,=20le=20fait=20de=20mettre=20?= =?UTF-8?q?a=20jours=20tous=20les=20dossiers=20a=20supprime=20timeout=20fa?= =?UTF-8?q?ce=20a=20PG.=20batch=20la=20maj?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/expired_dossiers_deletion_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/expired_dossiers_deletion_service.rb b/app/services/expired_dossiers_deletion_service.rb index 2c1b45def..a046ebd59 100644 --- a/app/services/expired_dossiers_deletion_service.rb +++ b/app/services/expired_dossiers_deletion_service.rb @@ -73,7 +73,7 @@ class ExpiredDossiersDeletionService user_notifications = group_by_user_email(dossiers_close_to_expiration) administration_notifications = group_by_fonctionnaire_email(dossiers_close_to_expiration) - dossiers_close_to_expiration.update_all(close_to_expiration_flag => Time.zone.now) + dossiers_close_to_expiration.in_batches.update_all(close_to_expiration_flag => Time.zone.now) user_notifications.each do |(email, dossiers)| DossierMailer.notify_near_deletion_to_user(dossiers, email).deliver_later