From ef75e1220ebb76a8df019d946460ad612759f0bb Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 3 Sep 2016 17:36:57 +0200 Subject: Send every imported item to the queue Instead of queing real Entry to process, we queue all the item to import from Pocket in a raw format. Then, the worker retrieve that information, find / create the entry and save it. --- .../ImportBundle/Component/AMPQ/EntryConsumer.php | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/Wallabag/ImportBundle/Component/AMPQ/EntryConsumer.php (limited to 'src/Wallabag/ImportBundle/Component/AMPQ') diff --git a/src/Wallabag/ImportBundle/Component/AMPQ/EntryConsumer.php b/src/Wallabag/ImportBundle/Component/AMPQ/EntryConsumer.php deleted file mode 100644 index 7775f01c..00000000 --- a/src/Wallabag/ImportBundle/Component/AMPQ/EntryConsumer.php +++ /dev/null @@ -1,39 +0,0 @@ -em = $em; - $this->entryRepository = $entryRepository; - $this->contentProxy = $contentProxy; - } - - /** - * {@inheritdoc} - */ - public function execute(AMQPMessage $msg) - { - $storedEntry = unserialize($msg->body); - $entry = $this->entryRepository->findByUrlAndUserId($storedEntry['url'], $storedEntry['userId']); - if ($entry) { - $entry = $this->contentProxy->updateEntry($entry, $entry->getUrl()); - if ($entry) { - $this->em->persist($entry); - $this->em->flush(); - } - } - } -} -- cgit v1.2.3