Skip to content

Commit 74ac3e2

Browse files
committed
Clear manager in the loop
Calling $manager->clear() in the import loop to avoid memory problems.
1 parent b01fa55 commit 74ac3e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Command/MeilisearchImportCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
141141
);
142142
}
143143

144+
$manager->clear();
145+
144146
++$page;
145147
} while (\count($entities) >= $batchSize);
146148

0 commit comments

Comments
 (0)