Skip to content

Commit 0444379

Browse files
committed
ACPT-99: Import API Parallelization
1 parent 28a672f commit 0444379

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ protected function _saveProductsData()
11581158
if ($this->_replaceFlag) {
11591159
$this->getOptionEntity()->clearProductsSkuToId();
11601160
}
1161+
$this->getOptionEntity()->setIds($this->getIds());
11611162
$this->getOptionEntity()->importData();
11621163
return $this;
11631164
}

app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ protected function _importData()
12561256
$prevOptionId = 0;
12571257
$optionId = null;
12581258
$valueId = null;
1259-
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
1259+
while ($bunch = $this->_dataSourceModel->getNextUniqueBunch($this->getIds())) {
12601260
$products = [];
12611261
$options = [];
12621262
$titles = [];

app/code/Magento/ImportExport/Model/Import/AbstractEntity.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,7 @@ protected function _saveValidatedBunches()
421421
$startNewBunch = false;
422422

423423
$source->rewind();
424-
if ($source instanceof Base64EncodedCsvData) {
425-
$this->_dataSourceModel->cleanProcessedBunches();
426-
} else {
424+
if (!$source instanceof Base64EncodedCsvData) {
427425
$this->_dataSourceModel->cleanBunches();
428426
}
429427
$mainAttributeCode = $this->getMasterAttributeCode();

app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ protected function _saveValidatedBunches()
395395
$skuSet = [];
396396

397397
$source->rewind();
398-
if ($source instanceof Base64EncodedCsvData) {
399-
$this->_dataSourceModel->cleanProcessedBunches();
400-
} else {
398+
if (!$source instanceof Base64EncodedCsvData) {
401399
$this->_dataSourceModel->cleanBunches();
402400
}
403401

@@ -911,4 +909,9 @@ public function getIds()
911909
{
912910
return $this->ids;
913911
}
912+
913+
public function setIds($ids)
914+
{
915+
$this->ids = $ids;
916+
}
914917
}

0 commit comments

Comments
 (0)