Skip to content

Commit e8ee3ab

Browse files
committed
ACPT-99: Import API Parallelization
1 parent 8815727 commit e8ee3ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public function importSource()
505505

506506
$result = $this->processImport();
507507
$this->getDataSourceModel()->markProcessedBunches($ids);
508-
$this->getDataSourceModel()->cleanBunchesWithId($ids);
508+
509509
if ($result) {
510510
$this->addLogComment(
511511
[
@@ -523,6 +523,14 @@ 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+
}
526534
return $result;
527535
}
528536

0 commit comments

Comments
 (0)