first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\KafkaBundle\Command;
|
||||
|
||||
use KupShop\KafkaBundle\SynchronizationRegister\ConsumersJobsRegister;
|
||||
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: 'kupshop:elastic:kafka', description: 'Process db changes from kafka and update index')]
|
||||
class ProcessDBChangesCommand extends Command
|
||||
{
|
||||
public function __construct(
|
||||
protected ConsumersJobsRegister $consumersJobsRegister,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->consumersJobsRegister->elasticJob();
|
||||
|
||||
$output->writeln('<info>Done - consumed changes from kafka</info>');
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user