$this ->
setName('sw:es:backlog:clear'
) ->
setDescription('Remove backlog entries that are already synchronized.'
) ;
} /**
* {@inheritdoc}
*/
protected function execute(InputInterface
$input, OutputInterface
$output) { $lastId =
$this->container->
get(\Shopware\Bundle\ESIndexingBundle\BacklogReader::
class)->
getLastBacklogId();
$this->container->
get(\Doctrine\DBAL\Connection::
class)->
executeUpdate('DELETE FROM s_es_backlog WHERE id <= :id',
[':id' =>
$lastId]);
return 0;
}}