Skip to content

Commit eda7b40

Browse files
committed
ACPT-99: Import API Parallelization
1 parent ddda6ee commit eda7b40

File tree

1 file changed

+4
-5
lines changed
  • app/code/Magento/ImportExport/Model/ResourceModel/Import

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function cleanProcessedBunches()
126126
$this->getConnection()->delete(
127127
$this->getMainTable(),
128128
[
129-
'is_processed' => true
129+
'is_processed' => '1'
130130
]
131131
);
132132
}
@@ -140,11 +140,10 @@ public function cleanProcessedBunches()
140140
*/
141141
public function markProcessedBunches(array $ids): void
142142
{
143-
$where = $ids ? ['id IN (?)' => $ids] : '';
144143
$this->getConnection()->update(
145144
$this->getMainTable(),
146-
['is_processed' => 1],
147-
$where
145+
['is_processed' => '1'],
146+
['id IN (?)' => $ids]
148147
);
149148
}
150149

@@ -286,7 +285,7 @@ public function saveBunch($entity, $behavior, array $data)
286285

287286
$this->getConnection()->insert(
288287
$this->getMainTable(),
289-
['behavior' => $behavior, 'entity' => $entity, 'data' => $encodedData, 'is_processed' => 0]
288+
['behavior' => $behavior, 'entity' => $entity, 'data' => $encodedData, 'is_processed' => '0']
290289
);
291290
return $this->getConnection()->lastInsertId($this->getMainTable());
292291
}

0 commit comments

Comments
 (0)