$this->connection->
executeStatement('TRUNCATE elasticsearch_index_task'
);
try { $gateway =
$this->gatewayRegistry->
get(IncrementGatewayRegistry::MESSAGE_QUEUE_POOL
);
$gateway->
reset('message_queue_stats', ElasticsearchIndexingMessage::
class);
} catch (IncrementGatewayNotFoundException
) { // In case message_queue pool is disabled
} $this->connection->
executeStatement('DELETE FROM `messenger_messages` WHERE `headers` LIKE "%ElasticsearchIndexingMessage%"'
);
$io->
success('Elasticsearch indices deleted and queue cleared'
);
return self::SUCCESS;
}}