From dc12084d933dc4981a6ff489622845053d4914b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 13 Apr 2016 14:46:31 +0200 Subject: Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live --- src/Wallabag/ImportBundle/Import/WallabagImport.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Wallabag/ImportBundle/Import/WallabagImport.php') 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; } -- cgit v1.2.3 From 23d24b17509ed3e8725bc911a8a2f8fe502e38f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 18 Apr 2016 15:29:57 +0200 Subject: Add tests --- src/Wallabag/ImportBundle/Import/WallabagImport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/ImportBundle/Import/WallabagImport.php') diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php index b265f9f1..65803823 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagImport.php +++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php @@ -185,7 +185,7 @@ abstract class WallabagImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); - $this->em->clear(); + $this->em->clear($entry); } ++$i; } -- cgit v1.2.3