diff options
author | fox <[email protected]> | 2021-12-25 15:36:14 +0300 |
---|---|---|
committer | fox <[email protected]> | 2021-12-25 15:36:14 +0300 |
commit | 40bb22328835fbd604abace34233bb95df6d7297 (patch) | |
tree | c0f798390314268045f52163bc242f1e6591d8cb | |
parent | 030e7f3fb202c1bd81d59085e0cf4de756d92531 (diff) | |
parent | 5c568f02c48831b2ee60a665293112fe73939229 (diff) |
Merge pull request 'fix: lower memory use' (#3) from disconn3ct/ttrss-data-migration:fix/memory-use into master
Reviewed-on: https://git.tt-rss.org/fox/ttrss-data-migration/pulls/3
-rw-r--r-- | init.php | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -175,6 +175,18 @@ class Data_Migration extends Plugin { if (count($batch["articles"]) != $batch_size) break; + + // flush all that used memory + if ($zip->close() !== TRUE) { + Debug::log("write error while saving data to $output_file"); + exit(3); + } + $zip = new ZipArchive(); + + if ($zip->open($output_file) !== TRUE) { + Debug::log("unable to reopen $output_file"); + exit(3); + } } if ($zip->close() !== TRUE) { |