Skip to content
Snippets Groups Projects
Commit 94925df5 authored by Laurent's avatar Laurent
Browse files

hotline #17298 memory leak

Index Batch is paginated
parent 2fb720da
Branches
Tags
6 merge requests!529Hotline 6.56,!512Master,!500Hotline 6.55,!498Master,!496Hotline 6.54,!492Hotline#17208 memory leak
......@@ -6,9 +6,19 @@ class Class_Batch_IndexRessourcesNumeriques extends Class_Batch_Abstract {
}
public function run() {
$albums = Class_Album::findAll();
foreach ($albums as $album)
$album->index();
$current_page = 0;
do {
$albums = Class_Album::findAllBy(['limitPage' => [$current_page += 1,
100]]);
foreach ($albums as $album)
$album->index();
Class_Album::clearCache();
Class_AlbumRessource::clearCache();
Class_Notice::clearCache();
Class_Exemplaire::clearCache();
} while(count($albums) > 0);
(new Storm_Cache())->clean();
}
......
storm @ 0d85dd08
Subproject commit 43139b708408945afa30c7ec40d1f5551ea1353a
Subproject commit 0d85dd08f6df9ebd8322973e0003dba41a09c249
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment