]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live
authorNicolas Lœuillet <nicolas@loeuillet.org>
Wed, 13 Apr 2016 12:46:31 +0000 (14:46 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Apr 2016 12:48:18 +0000 (14:48 +0200)
src/Wallabag/ImportBundle/Import/PocketImport.php
src/Wallabag/ImportBundle/Import/WallabagImport.php

index f598e61127c60d2b920ef73496c1b425e4fc6a0b..ac68b6d92b66396f21979a09ca6273d7bb5e6895 100644 (file)
@@ -258,6 +258,7 @@ class PocketImport implements ImportInterface
             // flush every 20 entries
             if (($i % 20) === 0) {
                 $this->em->flush();
+                $this->em->clear();
             }
             ++$i;
         }
index d65bc5306e1a35038768d5e054b45b3916788318..b265f9f1065aa343701a32b25853d0bcdec32c69 100644 (file)
@@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface
             // flush every 20 entries
             if (($i % 20) === 0) {
                 $this->em->flush();
+                $this->em->clear();
             }
             ++$i;
         }