aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php5
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php5
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php5
3 files changed, 3 insertions, 12 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index 841f829d..a6f905b1 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -255,14 +255,11 @@ class PocketImport extends AbstractImport
255 // flush every 20 entries 255 // flush every 20 entries
256 if (($i % 20) === 0) { 256 if (($i % 20) === 0) {
257 $this->em->flush(); 257 $this->em->flush();
258
259 // clear only affected entities
260 $this->em->clear(Entry::class);
261 $this->em->clear(Tag::class);
262 } 258 }
263 ++$i; 259 ++$i;
264 } 260 }
265 261
266 $this->em->flush(); 262 $this->em->flush();
263 $this->em->clear();
267 } 264 }
268} 265}
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
index 7bae647d..c7cfe15d 100644
--- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
+++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
@@ -169,14 +169,11 @@ class ReadabilityImport extends AbstractImport
169 // flush every 20 entries 169 // flush every 20 entries
170 if (($i % 20) === 0) { 170 if (($i % 20) === 0) {
171 $this->em->flush(); 171 $this->em->flush();
172
173 // clear only affected entities
174 $this->em->clear(Entry::class);
175 $this->em->clear(Tag::class);
176 } 172 }
177 ++$i; 173 ++$i;
178 } 174 }
179 175
180 $this->em->flush(); 176 $this->em->flush();
177 $this->em->clear();
181 } 178 }
182} 179}
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index 9cd3dcb8..581ec178 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -172,15 +172,12 @@ abstract class WallabagImport extends AbstractImport
172 // flush every 20 entries 172 // flush every 20 entries
173 if (($i % 20) === 0) { 173 if (($i % 20) === 0) {
174 $this->em->flush(); 174 $this->em->flush();
175
176 // clear only affected entities
177 $this->em->clear(Entry::class);
178 $this->em->clear(Tag::class);
179 } 175 }
180 ++$i; 176 ++$i;
181 } 177 }
182 178
183 $this->em->flush(); 179 $this->em->flush();
180 $this->em->clear();
184 } 181 }
185 182
186 /** 183 /**