Skip to content

Commit dd0374d

Browse files
authored
remove the isQueueActive() check for the product plugin (#830)
1 parent 6161093 commit dd0374d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Model/Indexer/ProductObserver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(IndexerRegistry $indexerRegistry, ConfigHelper $conf
3939
public function beforeSave(ProductResource $productResource, ProductModel $product)
4040
{
4141
$productResource->addCommitCallback(function () use ($product) {
42-
if (!$this->indexer->isScheduled() || $this->configHelper->isQueueActive()) {
42+
if (!$this->indexer->isScheduled()) {
4343
$this->indexer->reindexRow($product->getId());
4444
}
4545
});
@@ -60,7 +60,7 @@ public function beforeSave(ProductResource $productResource, ProductModel $produ
6060
public function beforeDelete(ProductResource $productResource, ProductModel $product)
6161
{
6262
$productResource->addCommitCallback(function () use ($product) {
63-
if (!$this->indexer->isScheduled() || $this->configHelper->isQueueActive()) {
63+
if (!$this->indexer->isScheduled()) {
6464
$this->indexer->reindexRow($product->getId());
6565
}
6666
});
@@ -77,7 +77,7 @@ public function beforeDelete(ProductResource $productResource, ProductModel $pro
7777
*/
7878
public function afterUpdateAttributes(Action $subject, Action $result = null, $productIds)
7979
{
80-
if (!$this->indexer->isScheduled() || $this->configHelper->isQueueActive()) {
80+
if (!$this->indexer->isScheduled()) {
8181
$this->indexer->reindexList(array_unique($productIds));
8282
}
8383

@@ -93,7 +93,7 @@ public function afterUpdateAttributes(Action $subject, Action $result = null, $p
9393
*/
9494
public function afterUpdateWebsites(Action $subject, Action $result = null, array $productIds)
9595
{
96-
if (!$this->indexer->isScheduled() || $this->configHelper->isQueueActive()) {
96+
if (!$this->indexer->isScheduled()) {
9797
$this->indexer->reindexList(array_unique($productIds));
9898
}
9999

0 commit comments

Comments
 (0)