Bugfix
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace MummertMedia\ContaoMeilisearchBundle\Command;
|
||||
|
||||
use MummertMedia\ContaoMeilisearchBundle\Service\MeilisearchIndexService;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[AsCommand(
|
||||
name: 'meilisearch:index',
|
||||
description: 'Rebuild Meilisearch index'
|
||||
)]
|
||||
class MeilisearchIndexCommand extends Command
|
||||
{
|
||||
public function __construct(
|
||||
private readonly MeilisearchIndexService $indexService
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$output->writeln('<info>Meilisearch index started</info>');
|
||||
|
||||
$this->indexService->run();
|
||||
|
||||
$output->writeln('<info>Meilisearch index finished</info>');
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user