-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #469 from magento-troll/troll_bugfix
MAGETWO-59144 [FT] Magento\ConfigurableProduct\Test\TestCase\CreateConfigurableProductEntityTest failed MAGETWO-56052 MySQL triggers for Indexers not removed after upgrade from 2.0.7ce to 2.1ce MAGETWO-59304 Test Magento\Test\Legacy\ModuleDBChangeTest:testModuleSetupFiles fails on developer branch MAGETWO-56676 Related Products Target Rule not working
- Loading branch information
Showing
6 changed files
with
132 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Indexer\Setup; | ||
|
||
use Magento\Framework\Setup\InstallDataInterface; | ||
use Magento\Framework\Setup\ModuleContextInterface; | ||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Indexer\Model\IndexerFactory; | ||
use Magento\Framework\Indexer\ConfigInterface; | ||
|
||
/** | ||
* Recurring data upgrade for indexer module | ||
*/ | ||
class RecurringData implements InstallDataInterface | ||
{ | ||
/** | ||
* @var IndexerFactory | ||
*/ | ||
private $indexerFactory; | ||
|
||
/** | ||
* @var ConfigInterface | ||
*/ | ||
private $configInterface; | ||
|
||
/** | ||
* RecurringData constructor. | ||
* | ||
* @param IndexerFactory $indexerFactory | ||
* @param ConfigInterface $configInterface | ||
*/ | ||
public function __construct( | ||
IndexerFactory $indexerFactory, | ||
ConfigInterface $configInterface | ||
) { | ||
$this->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(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters