up embed themes
This commit is contained in:
parent
f4e8c70ead
commit
f1d2374119
3 changed files with 14 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue