-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct console commands to be suffixed with Console and deprecate th…
…e former one.
- Loading branch information
1 parent
a55b01f
commit 28f7d09
Showing
2 changed files
with
46 additions
and
32 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
44 changes: 44 additions & 0 deletions
44
src/Spryker/Zed/Oms/Communication/Console/ClearLocksConsole.php
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,44 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Oms\Communication\Console; | ||
|
||
use Spryker\Zed\Console\Business\Model\Console; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* @method \Spryker\Zed\Oms\Business\OmsFacade getFacade() | ||
*/ | ||
class ClearLocksConsole extends Console | ||
{ | ||
|
||
const COMMAND_NAME = 'oms:clear-locks'; | ||
const COMMAND_DESCRIPTION = 'Clear OMS state machine expired locks from lock table'; | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function configure() | ||
{ | ||
$this->setName(self::COMMAND_NAME); | ||
$this->setDescription(self::COMMAND_DESCRIPTION); | ||
|
||
parent::configure(); | ||
} | ||
|
||
/** | ||
* @param \Symfony\Component\Console\Input\InputInterface $input | ||
* @param \Symfony\Component\Console\Output\OutputInterface $output | ||
* | ||
* @return void | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$this->getFacade()->clearLocks(); | ||
} | ||
|
||
} |