indexerFactory = $indexerFactory; $this->configInterface = $configInterface; } /** * {@inheritdoc} */ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { foreach (array_keys($this->configInterface->getIndexers()) as $indexerId) { $indexer = $this->indexerFactory->create()->load($indexerId); if ($indexer->isScheduled()) { $indexer->getView()->unsubscribe()->subscribe(); } } } }