From: Nicolas LÅ“uillet Date: Wed, 13 Apr 2016 12:46:31 +0000 (+0200) Subject: Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live X-Git-Tag: 2.0.2~5^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=dc12084d933dc4981a6ff489622845053d4914b3;p=github%2Fwallabag%2Fwallabag.git Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live --- diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index f598e611..ac68b6d9 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -258,6 +258,7 @@ class PocketImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; } diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php index d65bc530..b265f9f1 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagImport.php +++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php @@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; }