up embed themes

This commit is contained in:
Tykayn 2025-06-30 15:26:32 +02:00 committed by tykayn
parent f4e8c70ead
commit f1d2374119
3 changed files with 14 additions and 34 deletions

View file

@ -75,6 +75,7 @@ class FollowUpService
];
}
$now = new \DateTime();
$persisted = 0;
foreach ($types as $type => $data) {
// Suivi du nombre
$followupCount = new CityFollowUp();
@ -83,7 +84,11 @@ class FollowUpService
->setDate($now)
->setStats($stats);
$em->persist($followupCount);
$persisted++;
if ($persisted % 100 === 0) {
$em->flush();
$em->clear();
}
// Suivi de la complétion personnalisé (exemples)
$completed = [];
@ -198,8 +203,14 @@ class FollowUpService
->setDate($now)
->setStats($stats);
$em->persist($followupCompletion);
$persisted++;
if ($persisted % 100 === 0) {
$em->flush();
$em->clear();
}
}
$em->flush();
$em->clear();
}
public function generateGlobalFollowUps(EntityManagerInterface $em): void