diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-09 10:12:25 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-11 21:58:55 +0200 |
commit | 8664069e1aa2fa89e17587308a03f2720c20327a (patch) | |
tree | 67c1bd1279548ded1a366aaf01fd0a187a8271ba /src/Wallabag/ImportBundle/Consumer | |
parent | 6d65c0a8b089d3caa6f8e20d7935a9fe2f87d926 (diff) | |
download | wallabag-8664069e1aa2fa89e17587308a03f2720c20327a.tar.gz wallabag-8664069e1aa2fa89e17587308a03f2720c20327a.tar.zst wallabag-8664069e1aa2fa89e17587308a03f2720c20327a.zip |
Fix DateTime & clear()
Diffstat (limited to 'src/Wallabag/ImportBundle/Consumer')
-rw-r--r-- | src/Wallabag/ImportBundle/Consumer/AMPQ/EntryConsumer.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Consumer/AMPQ/EntryConsumer.php b/src/Wallabag/ImportBundle/Consumer/AMPQ/EntryConsumer.php index 8a8cf45d..72a3260a 100644 --- a/src/Wallabag/ImportBundle/Consumer/AMPQ/EntryConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/AMPQ/EntryConsumer.php | |||
@@ -7,6 +7,8 @@ use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface; | |||
7 | use PhpAmqpLib\Message\AMQPMessage; | 7 | use PhpAmqpLib\Message\AMQPMessage; |
8 | use Wallabag\ImportBundle\Import\AbstractImport; | 8 | use Wallabag\ImportBundle\Import\AbstractImport; |
9 | use Wallabag\UserBundle\Repository\UserRepository; | 9 | use Wallabag\UserBundle\Repository\UserRepository; |
10 | use Wallabag\CoreBundle\Entity\Entry; | ||
11 | use Wallabag\CoreBundle\Entity\Tag; | ||
10 | use Psr\Log\LoggerInterface; | 12 | use Psr\Log\LoggerInterface; |
11 | use Psr\Log\NullLogger; | 13 | use Psr\Log\NullLogger; |
12 | 14 | ||
@@ -53,7 +55,10 @@ class EntryConsumer implements ConsumerInterface | |||
53 | 55 | ||
54 | try { | 56 | try { |
55 | $this->em->flush(); | 57 | $this->em->flush(); |
56 | $this->em->clear($entry); | 58 | |
59 | // clear only affected entities | ||
60 | $this->em->clear(Entry::class); | ||
61 | $this->em->clear(Tag::class); | ||
57 | } catch (\Exception $e) { | 62 | } catch (\Exception $e) { |
58 | $this->logger->warning('Unable to save entry', ['entry' => $storedEntry, 'exception' => $e]); | 63 | $this->logger->warning('Unable to save entry', ['entry' => $storedEntry, 'exception' => $e]); |
59 | 64 | ||