Skip to content

Commit 41e5576

Browse files
committed
ACPT-99: Import API Parallelization
1 parent 65dd168 commit 41e5576

File tree

4 files changed

+3
-31
lines changed

4 files changed

+3
-31
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -523,14 +523,7 @@ public function importSource()
523523
} else {
524524
$this->importHistoryModel->invalidateReport($this);
525525
}
526-
try {
527-
if ($this->_getEntityAdapter()->getSource() instanceof Base64EncodedCsvData) {
528-
//$this->getDataSourceModel()->cleanBunchesWithId($ids);
529-
}
530-
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
531-
} catch (LocalizedException $e) {
532-
//Do nothing if Source is not set
533-
}
526+
534527
return $result;
535528
}
536529

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Magento\ImportExport\Model\Import;
1515
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1616
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
17-
use Magento\ImportExport\Model\Import\Source\Base64EncodedCsvData;
1817
use Magento\ImportExport\Model\ImportFactory;
1918
use Magento\ImportExport\Model\ResourceModel\Helper;
2019
use Magento\Store\Model\ScopeInterface;
@@ -421,9 +420,7 @@ protected function _saveValidatedBunches()
421420
$startNewBunch = false;
422421

423422
$source->rewind();
424-
if (!$source instanceof Base64EncodedCsvData) {
425-
$this->_dataSourceModel->cleanBunches();
426-
}
423+
$this->_dataSourceModel->cleanProcessedBunches();
427424
$mainAttributeCode = $this->getMasterAttributeCode();
428425

429426
while ($source->valid() || count($bunchRows) || isset($entityGroup)) {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use Magento\ImportExport\Model\Import as ImportExport;
1414
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1515
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
16-
use Magento\ImportExport\Model\Import\Source\Base64EncodedCsvData;
1716

1817
/**
1918
* Import entity abstract model
@@ -395,9 +394,7 @@ protected function _saveValidatedBunches()
395394
$skuSet = [];
396395

397396
$source->rewind();
398-
if (!$source instanceof Base64EncodedCsvData) {
399-
$this->_dataSourceModel->cleanBunches();
400-
}
397+
$this->_dataSourceModel->cleanProcessedBunches();
401398

402399
while ($source->valid() || $bunchRows) {
403400
if ($startNewBunch || !$source->valid()) {

app/code/Magento/ImportExport/Model/ResourceModel/Import/Data.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,6 @@ public function cleanBunches()
116116
return $this->getConnection()->delete($this->getMainTable());
117117
}
118118

119-
/**
120-
* Clean bunches with specific Ids
121-
*
122-
* @param array $ids
123-
* @return void
124-
*/
125-
public function cleanBunchesWithId(array $ids)
126-
{
127-
$this->getConnection()->delete(
128-
$this->getMainTable(),
129-
[
130-
'id IN (?)' => $ids,
131-
]
132-
);
133-
}
134119

135120
/**
136121
* Clean all bunches from table.

0 commit comments

Comments
 (0)