diff options
-rw-r--r-- | app/config/config.yml | 8 | ||||
-rw-r--r-- | app/config/parameters.yml.dist | 1 | ||||
-rw-r--r-- | docs/de/developer/asynchronous.rst | 1 | ||||
-rw-r--r-- | docs/en/developer/asynchronous.rst | 1 | ||||
-rw-r--r-- | docs/fr/developer/asynchronous.rst | 1 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/RssController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 6 |
8 files changed, 16 insertions, 6 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index d52f37c8..591b5294 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -300,6 +300,7 @@ old_sound_rabbit_mq: | |||
300 | queue_options: | 300 | queue_options: |
301 | name: 'wallabag.import.pocket' | 301 | name: 'wallabag.import.pocket' |
302 | callback: wallabag_import.consumer.amqp.pocket | 302 | callback: wallabag_import.consumer.amqp.pocket |
303 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
303 | import_readability: | 304 | import_readability: |
304 | connection: default | 305 | connection: default |
305 | exchange_options: | 306 | exchange_options: |
@@ -308,6 +309,7 @@ old_sound_rabbit_mq: | |||
308 | queue_options: | 309 | queue_options: |
309 | name: 'wallabag.import.readability' | 310 | name: 'wallabag.import.readability' |
310 | callback: wallabag_import.consumer.amqp.readability | 311 | callback: wallabag_import.consumer.amqp.readability |
312 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
311 | import_instapaper: | 313 | import_instapaper: |
312 | connection: default | 314 | connection: default |
313 | exchange_options: | 315 | exchange_options: |
@@ -316,6 +318,7 @@ old_sound_rabbit_mq: | |||
316 | queue_options: | 318 | queue_options: |
317 | name: 'wallabag.import.instapaper' | 319 | name: 'wallabag.import.instapaper' |
318 | callback: wallabag_import.consumer.amqp.instapaper | 320 | callback: wallabag_import.consumer.amqp.instapaper |
321 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
319 | import_pinboard: | 322 | import_pinboard: |
320 | connection: default | 323 | connection: default |
321 | exchange_options: | 324 | exchange_options: |
@@ -324,6 +327,7 @@ old_sound_rabbit_mq: | |||
324 | queue_options: | 327 | queue_options: |
325 | name: 'wallabag.import.pinboard' | 328 | name: 'wallabag.import.pinboard' |
326 | callback: wallabag_import.consumer.amqp.pinboard | 329 | callback: wallabag_import.consumer.amqp.pinboard |
330 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
327 | import_wallabag_v1: | 331 | import_wallabag_v1: |
328 | connection: default | 332 | connection: default |
329 | exchange_options: | 333 | exchange_options: |
@@ -332,6 +336,7 @@ old_sound_rabbit_mq: | |||
332 | queue_options: | 336 | queue_options: |
333 | name: 'wallabag.import.wallabag_v1' | 337 | name: 'wallabag.import.wallabag_v1' |
334 | callback: wallabag_import.consumer.amqp.wallabag_v1 | 338 | callback: wallabag_import.consumer.amqp.wallabag_v1 |
339 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
335 | import_wallabag_v2: | 340 | import_wallabag_v2: |
336 | connection: default | 341 | connection: default |
337 | exchange_options: | 342 | exchange_options: |
@@ -340,6 +345,7 @@ old_sound_rabbit_mq: | |||
340 | queue_options: | 345 | queue_options: |
341 | name: 'wallabag.import.wallabag_v2' | 346 | name: 'wallabag.import.wallabag_v2' |
342 | callback: wallabag_import.consumer.amqp.wallabag_v2 | 347 | callback: wallabag_import.consumer.amqp.wallabag_v2 |
348 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
343 | import_firefox: | 349 | import_firefox: |
344 | connection: default | 350 | connection: default |
345 | exchange_options: | 351 | exchange_options: |
@@ -348,6 +354,7 @@ old_sound_rabbit_mq: | |||
348 | queue_options: | 354 | queue_options: |
349 | name: 'wallabag.import.firefox' | 355 | name: 'wallabag.import.firefox' |
350 | callback: wallabag_import.consumer.amqp.firefox | 356 | callback: wallabag_import.consumer.amqp.firefox |
357 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
351 | import_chrome: | 358 | import_chrome: |
352 | connection: default | 359 | connection: default |
353 | exchange_options: | 360 | exchange_options: |
@@ -356,6 +363,7 @@ old_sound_rabbit_mq: | |||
356 | queue_options: | 363 | queue_options: |
357 | name: 'wallabag.import.chrome' | 364 | name: 'wallabag.import.chrome' |
358 | callback: wallabag_import.consumer.amqp.chrome | 365 | callback: wallabag_import.consumer.amqp.chrome |
366 | qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} | ||
359 | 367 | ||
360 | fos_js_routing: | 368 | fos_js_routing: |
361 | routes_to_expose: | 369 | routes_to_expose: |
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index a4dc0bde..97f51ed1 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -49,6 +49,7 @@ parameters: | |||
49 | rabbitmq_port: 5672 | 49 | rabbitmq_port: 5672 |
50 | rabbitmq_user: guest | 50 | rabbitmq_user: guest |
51 | rabbitmq_password: guest | 51 | rabbitmq_password: guest |
52 | rabbitmq_prefetch_count: 10 | ||
52 | 53 | ||
53 | # Redis processing | 54 | # Redis processing |
54 | redis_scheme: tcp | 55 | redis_scheme: tcp |
diff --git a/docs/de/developer/asynchronous.rst b/docs/de/developer/asynchronous.rst index 1707f321..742dd3e5 100644 --- a/docs/de/developer/asynchronous.rst +++ b/docs/de/developer/asynchronous.rst | |||
@@ -47,6 +47,7 @@ Bearbeite deine ``app/config/parameters.yml``-Datei, um die RabbitMQ-Parameter z | |||
47 | rabbitmq_port: 5672 | 47 | rabbitmq_port: 5672 |
48 | rabbitmq_user: guest | 48 | rabbitmq_user: guest |
49 | rabbitmq_password: guest | 49 | rabbitmq_password: guest |
50 | rabbitmq_prefetch_count: 10 # lesen http://www.rabbitmq.com/consumer-prefetch.html | ||
50 | 51 | ||
51 | RabbitMQ in wallabag aktivieren | 52 | RabbitMQ in wallabag aktivieren |
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
diff --git a/docs/en/developer/asynchronous.rst b/docs/en/developer/asynchronous.rst index 5cd40231..2e409e4a 100644 --- a/docs/en/developer/asynchronous.rst +++ b/docs/en/developer/asynchronous.rst | |||
@@ -48,6 +48,7 @@ Edit your ``app/config/parameters.yml`` file to edit RabbitMQ configuration. The | |||
48 | rabbitmq_port: 5672 | 48 | rabbitmq_port: 5672 |
49 | rabbitmq_user: guest | 49 | rabbitmq_user: guest |
50 | rabbitmq_password: guest | 50 | rabbitmq_password: guest |
51 | rabbitmq_prefetch_count: 10 # read http://www.rabbitmq.com/consumer-prefetch.html | ||
51 | 52 | ||
52 | Enable RabbitMQ in wallabag | 53 | Enable RabbitMQ in wallabag |
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
diff --git a/docs/fr/developer/asynchronous.rst b/docs/fr/developer/asynchronous.rst index 8a493acf..ff22daea 100644 --- a/docs/fr/developer/asynchronous.rst +++ b/docs/fr/developer/asynchronous.rst | |||
@@ -49,6 +49,7 @@ Modifiez votre fichier ``app/config/parameters.yml`` pour éditer la configurati | |||
49 | rabbitmq_port: 5672 | 49 | rabbitmq_port: 5672 |
50 | rabbitmq_user: guest | 50 | rabbitmq_user: guest |
51 | rabbitmq_password: guest | 51 | rabbitmq_password: guest |
52 | rabbitmq_prefetch_count: 10 # lire http://www.rabbitmq.com/consumer-prefetch.html | ||
52 | 53 | ||
53 | Activer RabbitMQ dans wallabag | 54 | Activer RabbitMQ dans wallabag |
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index ff6f564e..b03f49ed 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -319,7 +319,7 @@ class EntryController extends Controller | |||
319 | $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($form, $qb); | 319 | $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($form, $qb); |
320 | } | 320 | } |
321 | 321 | ||
322 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); | 322 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); |
323 | 323 | ||
324 | $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') | 324 | $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') |
325 | ->prepare($pagerAdapter, $page); | 325 | ->prepare($pagerAdapter, $page); |
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 2290386f..92f18707 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php | |||
@@ -85,7 +85,7 @@ class RssController extends Controller | |||
85 | throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); | 85 | throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); |
86 | } | 86 | } |
87 | 87 | ||
88 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); | 88 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); |
89 | $entries = new Pagerfanta($pagerAdapter); | 89 | $entries = new Pagerfanta($pagerAdapter); |
90 | 90 | ||
91 | $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); | 91 | $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); |
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 553ad6ab..b9532fa2 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -125,9 +125,7 @@ class EntryRepository extends EntityRepository | |||
125 | { | 125 | { |
126 | return $this | 126 | return $this |
127 | ->getBuilderByUser($userId) | 127 | ->getBuilderByUser($userId) |
128 | ->leftJoin('e.tags', 't') | 128 | ->andWhere('size(e.tags) = 0'); |
129 | ->groupBy('e.id') | ||
130 | ->having('count(t.id) = 0'); | ||
131 | } | 129 | } |
132 | 130 | ||
133 | /** | 131 | /** |
@@ -173,7 +171,7 @@ class EntryRepository extends EntityRepository | |||
173 | $qb->orderBy('e.updatedAt', $order); | 171 | $qb->orderBy('e.updatedAt', $order); |
174 | } | 172 | } |
175 | 173 | ||
176 | $pagerAdapter = new DoctrineORMAdapter($qb); | 174 | $pagerAdapter = new DoctrineORMAdapter($qb, true, false); |
177 | 175 | ||
178 | return new Pagerfanta($pagerAdapter); | 176 | return new Pagerfanta($pagerAdapter); |
179 | } | 177 | } |