Skip to content

Commit

Permalink
#26206 Add information about currently reindexed index.
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz committed Dec 30, 2019
1 parent 6159dc8 commit 1ca03a3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$returnValue = Cli::RETURN_FAILURE;
foreach ($this->getIndexers($input) as $indexer) {
$output->write($indexer->getTitle() . ' ');
try {
$this->validateIndexerStatus($indexer);
$startTime = microtime(true);
Expand All @@ -90,8 +91,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}
$resultTime = microtime(true) - $startTime;

$output->writeln(
$indexer->getTitle() . ' index has been rebuilt successfully in ' . gmdate('H:i:s', $resultTime)
__('index has been rebuilt successfully in %time', ['time' => gmdate('H:i:s', $resultTime)])
);
$returnValue = Cli::RETURN_SUCCESS;
} catch (LocalizedException $e) {
Expand All @@ -111,7 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
*/
protected function getIndexers(InputInterface $input)
{
$indexers = parent::getIndexers($input);
$indexers = parent::getIndexers($input);
$allIndexers = $this->getAllIndexers();
if (!array_diff_key($allIndexers, $indexers)) {
return $indexers;
Expand Down

0 comments on commit 1ca03a3

Please sign in to comment.