From 0fd63ae47f91d2a7747a5ba1f8b1a12f45ec9048 Mon Sep 17 00:00:00 2001 From: Divesh Pahuja Date: Thu, 12 Oct 2023 11:51:16 +0200 Subject: [PATCH] Review changes --- src/Messenger/DataImporterHandler.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Messenger/DataImporterHandler.php b/src/Messenger/DataImporterHandler.php index 98a28707..a25c79f9 100644 --- a/src/Messenger/DataImporterHandler.php +++ b/src/Messenger/DataImporterHandler.php @@ -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());