Skip to content

Commit

Permalink
fix batching on products import
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGrimmChester committed Nov 16, 2023
1 parent 2ffa9ba commit 0102f56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Task/Product/ProcessProductsTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
$this->process($payload);
}

$this->processManager->waitForAllProcesses();
$this->processManager->startAll();

return $payload;
}
Expand All @@ -114,6 +114,9 @@ private function handleProducts(
int &$count = 0,
array &$ids = [],
): void {
$this->processManager->setInstantProcessing($payload->getProcessAsSoonAsPossible());
$this->processManager->setNumberOfParallelProcesses($payload->getMaxRunningProcessQueueSize());

while (
($page instanceof Page && $page->hasNextPage()) ||
($page instanceof Page && !$page->hasPreviousPage()) ||
Expand Down

0 comments on commit 0102f56

Please sign in to comment.