Skip to content

Commit 7e06366

Browse files
committed
ACPT-1751: Enable Suspension of Cron-Triggered Indexer Operations
- Update command parameters;
1 parent 8791c22 commit 7e06366

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public function getInputList(): array
9494
$modeOptions[] = new InputArgument(
9595
self::INPUT_KEY_STATUS,
9696
InputArgument::REQUIRED,
97-
'Indexer status type [' . StateInterface::STATUS_VALID
98-
. '|' . StateInterface::STATUS_INVALID . '|' . StateInterface::STATUS_SUSPENDED . ']'
97+
'Indexer status type [' . StateInterface::STATUS_INVALID
98+
. '|' . StateInterface::STATUS_SUSPENDED . '|' . StateInterface::STATUS_VALID . ']'
9999
);
100100

101101
return array_merge($modeOptions, parent::getInputList());
@@ -111,9 +111,9 @@ private function validate(InputInterface $input): array
111111
{
112112
$errors = [];
113113
$acceptedValues = [
114-
StateInterface::STATUS_VALID,
115114
StateInterface::STATUS_INVALID,
116115
StateInterface::STATUS_SUSPENDED,
116+
StateInterface::STATUS_VALID
117117
];
118118
$inputStatus = $input->getArgument(self::INPUT_KEY_STATUS);
119119

app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerSetStatusCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testExecuteInvalidStatus()
6767
{
6868
$this->expectException('InvalidArgumentException');
6969
$this->expectExceptionMessage(
70-
'Invalid status "wrong_status". Accepted values are "valid", "invalid", "suspended".'
70+
'Invalid status "wrong_status". Accepted values are "invalid", "suspended", "valid".'
7171
);
7272
$commandTester = new CommandTester($this->command);
7373
$commandTester->execute(['status' => 'wrong_status']);

0 commit comments

Comments
 (0)