Skip to content

Commit 3da9268

Browse files
committed
ACPT-1751: Enable Suspension of Cron-Triggered Indexer Operations
- Fix static tests;
1 parent b30e490 commit 3da9268

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

app/code/Magento/Indexer/Console/Command/IndexerSetStatusCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class IndexerSetStatusCommand extends AbstractIndexerManageCommand
2626
/**#@+
2727
* Names of input arguments or options
2828
*/
29-
const INPUT_KEY_STATUS = 'status';
29+
private const INPUT_KEY_STATUS = 'status';
3030
/**#@- */
3131

3232
/**
@@ -47,7 +47,7 @@ public function __construct(
4747
}
4848

4949
/**
50-
* {@inheritdoc}
50+
* @inheritdoc
5151
*/
5252
protected function configure()
5353
{
@@ -59,7 +59,7 @@ protected function configure()
5959
}
6060

6161
/**
62-
* {@inheritdoc}
62+
* @inheritdoc
6363
*/
6464
protected function execute(InputInterface $input, OutputInterface $output)
6565
{

app/code/Magento/Indexer/Model/ResourceModel/Indexer/State.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ protected function prepareDataForUpdate($object)
3131
$data = parent::prepareDataForUpdate($object);
3232

3333
if (isset($data['status']) && StateInterface::STATUS_VALID === $data['status']) {
34-
$condition = $this->getConnection()->quoteInto('status IN (?)',
34+
$condition = $this->getConnection()->quoteInto(
35+
'status IN (?)',
3536
[
3637
StateInterface::STATUS_WORKING,
3738
StateInterface::STATUS_SUSPENDED

app/code/Magento/Indexer/Plugin/Mview/ViewUpdatePlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function __construct(
5151
/**
5252
* Prevent updating a view if the associated indexer is suspended
5353
*
54-
* @param ViewInterface $subject
55-
* @param callable $proceed
56-
* @return void
54+
* @param ViewInterface $subject
55+
* @param callable $proceed
56+
* @return void
5757
*/
5858
public function aroundUpdate(ViewInterface $subject, callable $proceed): void
5959
{

lib/internal/Magento/Framework/Indexer/StateInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ interface StateInterface
1414
/**
1515
* Indexer statuses
1616
*/
17-
const STATUS_WORKING = 'working';
18-
const STATUS_VALID = 'valid';
19-
const STATUS_INVALID = 'invalid';
20-
const STATUS_SUSPENDED = 'suspended';
17+
public const STATUS_WORKING = 'working';
18+
public const STATUS_VALID = 'valid';
19+
public const STATUS_INVALID = 'invalid';
20+
public const STATUS_SUSPENDED = 'suspended';
2121

2222
/**
2323
* Return indexer id

0 commit comments

Comments
 (0)