Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Oct 12, 2023
1 parent 02e9b33 commit 0fd63ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Messenger/DataImporterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@ public function __construct(

public function __invoke(DataImporterMessage $message)
{
foreach ($message->getIds() as $i => $id) {
foreach ($message->getIds() as $id) {
$this->importProcessingService->processQueueItem($id);

// call the garbage collector to avoid too many connections & memory issue
if (($i + 1) % 200 === 0) {
\Pimcore::collectGarbage();
}
}

$this->removeMessage($message->getMessageId());
Expand Down

0 comments on commit 0fd63ae

Please sign in to comment.