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.
This commit is contained in:
Jeremy Benoist
2016-09-03 17:36:57 +02:00
parent 87c9995b6c
commit ef75e1220e
9 changed files with 226 additions and 159 deletions

View File

@ -1,10 +1,11 @@
services:
wallabag_import.consumer.entry:
class: Wallabag\ImportBundle\Component\AMPQ\EntryConsumer
wallabag_import.consumer.pocket:
class: Wallabag\ImportBundle\Consumer\AMPQ\PocketConsumer
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_core.entry_repository"
- "@wallabag_core.content_proxy"
- "@wallabag_user.user_repository"
- "@wallabag_import.pocket.import"
- "@logger"
wallabag_import.chain:
class: Wallabag\ImportBundle\Import\ImportChain
@ -21,11 +22,9 @@ services:
wallabag_import.pocket.import:
class: Wallabag\ImportBundle\Import\PocketImport
arguments:
- "@security.token_storage"
- "@doctrine.orm.entity_manager"
- "@wallabag_core.content_proxy"
- "@craue_config"
- "@old_sound_rabbit_mq.wallabag_producer"
calls:
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
- [ setLogger, [ "@logger" ]]