mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +00:00
Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live
This commit is contained in:
parent
0907a72c64
commit
dc12084d93
2 changed files with 2 additions and 0 deletions
|
@ -258,6 +258,7 @@ class PocketImport implements ImportInterface
|
||||||
// flush every 20 entries
|
// flush every 20 entries
|
||||||
if (($i % 20) === 0) {
|
if (($i % 20) === 0) {
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
$this->em->clear();
|
||||||
}
|
}
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface
|
||||||
// flush every 20 entries
|
// flush every 20 entries
|
||||||
if (($i % 20) === 0) {
|
if (($i % 20) === 0) {
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
$this->em->clear();
|
||||||
}
|
}
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue