Loading module/Administration/src/Command/CalculTableauxBordCommand.php +19 −2 Changes for module/Administration/src/Command/CalculTableauxBordCommand.php: 19 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Administration\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; Loading @@ -18,6 +19,8 @@ class CalculTableauxBordCommand extends Command { use TableauBordServiceAwareTrait; private ProgressBar $progressBar; protected function configure(): void { $this->setDescription('Calcul des tableaux de bord'); Loading @@ -29,6 +32,8 @@ class CalculTableauxBordCommand extends Command $io->title($this->getDescription()); $this->progressBar = $io->createProgressBar(0); $this->getServiceTableauBord()->setOnAction(function(Event $event) use ($io){ $this->onEvent($event, $io); }); Loading Loading @@ -56,8 +61,20 @@ class CalculTableauxBordCommand extends Command case Event::FINISH: $io->info("Calcul effectué en ".round($event->tableauBord->getTiming(), 3)." secondes"); break; default: echo $event->action."\n"; case Event::GET: $io->info("Récupération des données"); break; case Event::PROCESS: $io->info("Traitement"); $this->progressBar = $io->createProgressBar($event->total); break; case Event::SET: $io->info("Enregistrement"); $this->progressBar = $io->createProgressBar($event->total); break; case Event::PROGRESS: $this->progressBar->setMaxSteps($event->total); $this->progressBar->setProgress($event->progress); } } Loading Loading
module/Administration/src/Command/CalculTableauxBordCommand.php +19 −2 Changes for module/Administration/src/Command/CalculTableauxBordCommand.php: 19 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Administration\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; Loading @@ -18,6 +19,8 @@ class CalculTableauxBordCommand extends Command { use TableauBordServiceAwareTrait; private ProgressBar $progressBar; protected function configure(): void { $this->setDescription('Calcul des tableaux de bord'); Loading @@ -29,6 +32,8 @@ class CalculTableauxBordCommand extends Command $io->title($this->getDescription()); $this->progressBar = $io->createProgressBar(0); $this->getServiceTableauBord()->setOnAction(function(Event $event) use ($io){ $this->onEvent($event, $io); }); Loading Loading @@ -56,8 +61,20 @@ class CalculTableauxBordCommand extends Command case Event::FINISH: $io->info("Calcul effectué en ".round($event->tableauBord->getTiming(), 3)." secondes"); break; default: echo $event->action."\n"; case Event::GET: $io->info("Récupération des données"); break; case Event::PROCESS: $io->info("Traitement"); $this->progressBar = $io->createProgressBar($event->total); break; case Event::SET: $io->info("Enregistrement"); $this->progressBar = $io->createProgressBar($event->total); break; case Event::PROGRESS: $this->progressBar->setMaxSteps($event->total); $this->progressBar->setProgress($event->progress); } } Loading