compute after labourage in command

This commit is contained in:
Tykayn 2025-08-02 11:22:09 +02:00 committed by tykayn
parent d9b95f5c1a
commit 37fd162824
2 changed files with 5 additions and 5 deletions

View file

@ -142,14 +142,14 @@ class ProcessLabourageQueueCommand extends Command
}
}
$stats->setDateLabourageDone(new \DateTime());
$io->info('Récupération des followups de cette ville...');
// $this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager);
// update completion
$stats->computeCompletionPercent();
$io->info('Pourcentage de complétion: ' . $stats->getCompletionPercent());
$this->entityManager->persist($stats);
$this->entityManager->flush();
$io->info('Récupération des followups de cette ville...');
$this->followUpService->generateCityFollowUps($stats, $this->motocultrice, $this->entityManager);
$this->entityManager->persist($stats);
$this->entityManager->flush();

View file

@ -819,7 +819,7 @@ final class AdminController extends AbstractController
// Mettre à jour la date de requête de labourage
$stats->setDateLabourageRequested(new \DateTime());
$stats->computeCompletionPercent();
$this->entityManager->persist($stats);
$this->entityManager->flush();