-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from lizardmedia/async-indexing-fix-+-unit-tests
Correcting async indexers running + adding unit tests.
- Loading branch information
Showing
27 changed files
with
1,048 additions
and
163 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Api/Adapter/ReactPHP/ChildProcess/ProcessFactoryInterface.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,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* File:ProcessFactoryInterface.php | ||
* | ||
* @author Maciej Sławik <maciej.slawik@lizardmedia.pl> | ||
* @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl) | ||
*/ | ||
|
||
namespace LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\ChildProcess; | ||
|
||
use React\ChildProcess\Process; | ||
|
||
/** | ||
* Interface ProcessFactoryInterface | ||
* @package LizardMedia\AdminIndexer\Api\Adapter\ReactPHP | ||
*/ | ||
interface ProcessFactoryInterface | ||
{ | ||
/** | ||
* @param string $command | ||
* @return Process | ||
*/ | ||
public function create(string $command): Process; | ||
} |
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,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* File: LoopFactoryInterface.php | ||
* | ||
* @author Bartosz Kubicki bartosz.kubicki@lizardmedia.pl> | ||
* @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl) | ||
*/ | ||
|
||
namespace LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\EventLoop; | ||
|
||
use React\EventLoop\Factory; | ||
use React\EventLoop\LoopInterface; | ||
|
||
/** | ||
* Interface LoopFactoryInterface | ||
* @package LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\EventLoop | ||
*/ | ||
interface LoopFactoryInterface | ||
{ | ||
/** | ||
* @return LoopInterface | ||
*/ | ||
public function create(): LoopInterface; | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* File: ReindexFailureAggregateException.php | ||
* | ||
* @author Bartosz Kubicki bartosz.kubicki@lizardmedia.pl> | ||
* @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl) | ||
*/ | ||
|
||
namespace LizardMedia\AdminIndexer\Exception; | ||
|
||
use Magento\Framework\Exception\AbstractAggregateException; | ||
|
||
/** | ||
* Class ReindexFailureAggregateException | ||
* @package LizardMedia\AdminIndexer\Exception | ||
*/ | ||
class ReindexFailureAggregateException extends AbstractAggregateException | ||
{ | ||
} |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* File:ProcessFactory.php | ||
* | ||
* @author Maciej Sławik <maciej.slawik@lizardmedia.pl> | ||
* @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl) | ||
*/ | ||
|
||
namespace LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\ChildProcess; | ||
|
||
use LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\ChildProcess\ProcessFactoryInterface; | ||
use React\ChildProcess\Process; | ||
|
||
/** | ||
* Class ProcessFactory | ||
* @package LizardMedia\AdminIndexer\Model\Adapter\ReactPHP | ||
*/ | ||
class ProcessFactory implements ProcessFactoryInterface | ||
{ | ||
/** | ||
* @param string $command | ||
* @return Process | ||
*/ | ||
public function create(string $command): Process | ||
{ | ||
return new Process($command); | ||
} | ||
} |
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,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* File: LoopFactory.php | ||
* | ||
* @author Bartosz Kubicki bartosz.kubicki@lizardmedia.pl> | ||
* @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl) | ||
*/ | ||
|
||
namespace LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\EventLoop; | ||
|
||
use LizardMedia\AdminIndexer\Api\Adapter\ReactPHP\EventLoop\LoopFactoryInterface; | ||
use React\EventLoop\LoopInterface; | ||
use React\EventLoop\Factory; | ||
|
||
/** | ||
* Class LoopFactory | ||
* @package LizardMedia\AdminIndexer\Model\Adapter\ReactPHP\EventLoop | ||
*/ | ||
class LoopFactory implements LoopFactoryInterface | ||
{ | ||
/** | ||
* @var Factory | ||
*/ | ||
private $factory; | ||
|
||
/** | ||
* LoopFactory constructor. | ||
* @param Factory $factory | ||
*/ | ||
public function __construct( | ||
Factory $factory | ||
) { | ||
$this->factory = $factory; | ||
} | ||
|
||
/** | ||
* @return LoopInterface | ||
*/ | ||
public function create(): LoopInterface | ||
{ | ||
return $this->factory->create(); | ||
} | ||
} |
Oops, something went wrong.