Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-31930: Cleaned up output of commands displaying progress bar #3070

Merged
merged 1 commit into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('Re-indexing started for search engine: ' . $this->searchIndexer->getName());
$output->writeln('');

$return = $this->indexIncrementally($input, $output, $iterationCount, $commit);

$output->writeln('');
$output->writeln('Finished re-indexing');

return $return;
return $this->indexIncrementally($input, $output, $iterationCount, $commit);
}

return 0;
Expand Down Expand Up @@ -257,6 +252,11 @@ protected function indexIncrementally(InputInterface $input, OutputInterface $ou
}

$progress->finish();
$output->writeln('');
$output->writeln('Finished re-indexing');
$output->writeln('');
// clear leftover progress bar parts
$progress->clear();

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ public function importSchema()
}

$progressBar->finish();
// go to the next line after ProgressBar::finish
$this->output->writeln('');
// go to the next line after ProgressBar::finish and add one more extra blank line for readability
$this->output->writeln(PHP_EOL);
// clear any leftover progress bar parts in the output buffer
$progressBar->clear();
}

/**
Expand Down