Skip to content

Commit

Permalink
add debug info for pushword image cache command
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed May 3, 2021
1 parent 7f70f57 commit 9f65d25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/Command/ImageManagerCommand.php
Expand Up @@ -63,9 +63,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$medias = $this->getMedias($input);

$progressBar = new ProgressBar($output, \count($medias));
$progressBar->setMessage('');
$progressBar->setFormat("%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% \r\n %message%");
$progressBar->start();
foreach ($medias as $media) {
if ($this->imageManager->isImage($media)) {
$progressBar->setMessage($media->getPath());
$this->imageManager->generateCache($media);
}
$progressBar->advance();
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/Command/ImageOptimizerCommand.php
Expand Up @@ -63,9 +63,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$medias = $this->getMedias($input);

$progressBar = new ProgressBar($output, \count($medias));
$progressBar->setMessage('');
$progressBar->setFormat("%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% \r\n %message%");
$progressBar->start();
foreach ($medias as $media) {
if ($this->imageManager->isImage($media)) {
$progressBar->setMessage($media->getPath());
$this->imageManager->optimize($media);
}
$progressBar->advance();
Expand Down

0 comments on commit 9f65d25

Please sign in to comment.