From 3f3a60879e168f4a8040c441e295fa63e024961d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 8 Oct 2016 12:59:17 +0200 Subject: Add entry export in API Export isn't available for json & xml because user can use the default entry endpoint instead. --- app/config/config.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 75d7299c..48f317c7 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -130,6 +130,8 @@ fos_rest: nelmio_api_doc: sandbox: enabled: false + cache: + enabled: true name: wallabag API documentation nelmio_cors: -- cgit v1.2.3 From f1c3f68e909e51f071f3f4b2ef9430163bbfd7a4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 15 Oct 2016 16:46:42 +0200 Subject: ApiDoc & Route annotation were conflicted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generated error was “Unable to guess how to get a Doctrine instance from the request information.”. I haven’t checked deeper in Doctrine (I know it was coming from the DoctrineParamConverter). Anyway, I check for FosRest possiblity to add extra format without allowing them for every route (like it was done in the first place). I finally found a way but it then seems all request goes to the FormatListener of FosRest so I needed to add a custom rules to match all request to be sure we don’t get a 406 error from FosRest. Should be ok now … --- app/config/config.yml | 27 +++++++++++++++++++++++++-- app/config/routing_rest.yml | 5 ++--- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 2f102c45..b4760073 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -112,12 +112,26 @@ swiftmailer: fos_rest: param_fetcher_listener: true body_listener: true - format_listener: true view: + mime_types: + csv: + - 'text/csv' + - 'text/plain' + pdf: + - 'application/pdf' + epub: + - 'application/epub+zip' + mobi: + - 'application/x-mobipocket-ebook' view_response_listener: 'force' formats: xml: true - json : true + json: true + txt: true + csv: true + pdf: true + epub: true + mobi: true templating_formats: html: true force_redirects: @@ -126,6 +140,15 @@ fos_rest: default_engine: twig routing_loader: default_format: json + format_listener: + enabled: true + rules: + - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: false, prefer_extension: false } + - { path: "^/api", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener + # so we need to add custom rule for custom api export but also for all other routes of the application... + - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false } nelmio_api_doc: sandbox: diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml index 52d395dd..29f4ab14 100644 --- a/app/config/routing_rest.yml +++ b/app/config/routing_rest.yml @@ -1,4 +1,3 @@ Rest_Wallabag: - type : rest - resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" - + type : rest + resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" -- cgit v1.2.3 From 98efffc2a62820bad347a0f93840c48fa57f8cc3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Oct 2016 10:52:13 +0200 Subject: Fix emoji insertion in MySQL Switch to utf8mb4 instead of utf8 because f*** MySQL See https://github.com/doctrine/dbal/pull/851 --- app/config/config.yml | 2 +- app/config/config_test.yml | 2 +- app/config/parameters.yml.dist | 14 ++++++++------ app/config/parameters_test.yml | 1 + app/config/tests/parameters_test.mysql.yml | 1 + app/config/tests/parameters_test.pgsql.yml | 1 + app/config/tests/parameters_test.sqlite.yml | 1 + 7 files changed, 14 insertions(+), 8 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index b4760073..9dbc9d7c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -75,7 +75,7 @@ doctrine: dbname: "%database_name%" user: "%database_user%" password: "%database_password%" - charset: UTF8 + charset: "%database_charset%" path: "%database_path%" unix_socket: "%database_socket%" server_version: 5.6 diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 3eab6fb2..f5e2c25e 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -28,7 +28,7 @@ doctrine: dbname: "%test_database_name%" user: "%test_database_user%" password: "%test_database_password%" - charset: UTF8 + charset: "%test_database_charset%" path: "%test_database_path%" orm: metadata_cache_driver: diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index ece4903a..a33ea37b 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -19,16 +19,18 @@ parameters: database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" database_table_prefix: wallabag_ database_socket: null + # with MySQL, use "utf8mb4" if got problem with content with emojis + database_charset: utf8 - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: ~ - mailer_password: ~ + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ - locale: en + locale: en # A secret key that's used to generate certain security-related tokens - secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv + secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv # two factor stuff twofactor_auth: true diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 2943b27a..5f2e25bb 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -6,3 +6,4 @@ parameters: test_database_user: null test_database_password: null test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' + test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml index d8512845..bca2d466 100644 --- a/app/config/tests/parameters_test.mysql.yml +++ b/app/config/tests/parameters_test.mysql.yml @@ -6,3 +6,4 @@ parameters: test_database_user: root test_database_password: ~ test_database_path: ~ + test_database_charset: utf8mb4 diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml index 41383868..3e18d4a0 100644 --- a/app/config/tests/parameters_test.pgsql.yml +++ b/app/config/tests/parameters_test.pgsql.yml @@ -6,3 +6,4 @@ parameters: test_database_user: travis test_database_password: ~ test_database_path: ~ + test_database_charset: utf8 diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 1952e3a6..0efbe786 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -6,3 +6,4 @@ parameters: test_database_user: ~ test_database_password: ~ test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" + test_database_charset: utf8mb4 -- cgit v1.2.3 From 2f82e7f8e1827423e2dbe4a91089c66d3afff367 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 8 Oct 2016 10:57:57 +0200 Subject: Cleanup subscriber / listener definition --- app/config/parameters_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/config') diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 5f2e25bb..3111da47 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -6,4 +6,4 @@ parameters: test_database_user: null test_database_password: null test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' - test_database_charset: utf8 + test_database_charset: utf8mb4 -- cgit v1.2.3 From b0de88f75dead50385e80e3897dc3913a971b91e Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 11 Oct 2016 21:45:43 +0200 Subject: Use statements & update translation --- app/config/parameters.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/config') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index a33ea37b..436eeeda 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -20,7 +20,7 @@ parameters: database_table_prefix: wallabag_ database_socket: null # with MySQL, use "utf8mb4" if got problem with content with emojis - database_charset: utf8 + database_charset: utf8mb4 mailer_transport: smtp mailer_host: 127.0.0.1 -- cgit v1.2.3 From fc79f1ffa82529e5340d115b2f438ac5952e9cb0 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 22 Oct 2016 13:41:03 +0200 Subject: Add verification check for MySQL version Must now be >= 5.5.4 --- app/config/parameters.yml.dist | 4 ++-- app/config/tests/parameters_test.sqlite.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/config') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 436eeeda..7a22cb98 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -19,8 +19,8 @@ parameters: database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" database_table_prefix: wallabag_ database_socket: null - # with MySQL, use "utf8mb4" if got problem with content with emojis - database_charset: utf8mb4 + # with MySQL, use "utf8mb4" if you got problem with content with emojis + database_charset: utf8 mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 0efbe786..b8a5f41a 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -6,4 +6,4 @@ parameters: test_database_user: ~ test_database_password: ~ test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" - test_database_charset: utf8mb4 + test_database_charset: utf8 -- cgit v1.2.3 From f623516e107c8146f87d815f033cecb5d812466a Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 24 Oct 2016 10:10:38 +0200 Subject: SQLite should use utf8, not utf8mb4 --- app/config/parameters_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/config') diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 3111da47..5f2e25bb 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -6,4 +6,4 @@ parameters: test_database_user: null test_database_password: null test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' - test_database_charset: utf8mb4 + test_database_charset: utf8 -- cgit v1.2.3 From 535bfcbe80de5d697b768c3a657214fdeff0eac3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 30 Oct 2016 09:58:39 +0100 Subject: Move related event things in Event folder --- app/config/services.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/config') diff --git a/app/config/services.yml b/app/config/services.yml index a57ef0f3..9a1ce80b 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -32,13 +32,13 @@ services: - { name: twig.extension } wallabag.locale_listener: - class: Wallabag\CoreBundle\EventListener\LocaleListener + class: Wallabag\CoreBundle\Event\Listener\LocaleListener arguments: ["%kernel.default_locale%"] tags: - { name: kernel.event_subscriber } wallabag.user_locale_listener: - class: Wallabag\CoreBundle\EventListener\UserLocaleListener + class: Wallabag\CoreBundle\Event\Listener\UserLocaleListener arguments: ["@session"] tags: - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } -- cgit v1.2.3 From 9ab024b4f5388e2a41c50a8a2b79e4033788782a Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 4 Nov 2016 22:44:31 +0100 Subject: Add Pinboard import --- app/config/config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 7f24244d..ff0f5a0b 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -266,6 +266,11 @@ old_sound_rabbit_mq: exchange_options: name: 'wallabag.import.readability' type: topic + import_pinboard: + connection: default + exchange_options: + name: 'wallabag.import.pinboard' + type: topic import_instapaper: connection: default exchange_options: @@ -316,6 +321,14 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.instapaper' callback: wallabag_import.consumer.amqp.instapaper + import_pinboard: + connection: default + exchange_options: + name: 'wallabag.import.pinboard' + type: topic + queue_options: + name: 'wallabag.import.pinboard' + callback: wallabag_import.consumer.amqp.pinboard import_wallabag_v1: connection: default exchange_options: -- cgit v1.2.3 From db3838545cef117e05c63afc1e7ebfdf8c8d3a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 6 Nov 2016 15:34:08 +0100 Subject: Removed Maintenance bundle --- app/config/config.yml | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 7f24244d..0dc5809a 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -236,16 +236,6 @@ kphoen_rulerz: executors: doctrine: true -lexik_maintenance: - authorized: - ips: ['127.0.0.1'] - driver: - ttl: 3600 - class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver' - response: - code: 503 - status: "wallabag Service Temporarily Unavailable" - old_sound_rabbit_mq: connections: default: -- cgit v1.2.3 From 3cc78f06799b0c91957767e8d9255e67b30edd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 24 Oct 2016 11:20:11 +0200 Subject: Added shortcuts --- app/config/config.yml | 3 +++ app/config/routing.yml | 3 +++ 2 files changed, 6 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 168634cf..494a67a9 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -351,3 +351,6 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.chrome' callback: wallabag_import.consumer.amqp.chrome + +fos_js_routing: + routes_to_expose: [ homepage, starred, archive, all, tag, config, import, developer, howto, about, logout ] diff --git a/app/config/routing.yml b/app/config/routing.yml index 750ed435..eedf51d5 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -52,3 +52,6 @@ craue_config_settings_modify: path: /settings defaults: _controller: CraueConfigBundle:Settings:modify + +fos_js_routing: + resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" -- cgit v1.2.3 From 49c5d0ad6ef5ceafdc0bec4533afcd27a01bd75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 24 Oct 2016 12:58:19 +0200 Subject: Changed FOSJSRouting format in config --- app/config/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 494a67a9..3cde2377 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -353,4 +353,15 @@ old_sound_rabbit_mq: callback: wallabag_import.consumer.amqp.chrome fos_js_routing: - routes_to_expose: [ homepage, starred, archive, all, tag, config, import, developer, howto, about, logout ] + routes_to_expose: + - homepage + - starred + - archive + - all + - tag + - config + - import + - developer + - howto + - about + - logout -- cgit v1.2.3 From f9cded7dd2acab3af8ff8481941e0c199daf8270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 24 Oct 2016 20:37:49 +0200 Subject: Added new shortcuts --- app/config/config.yml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 3cde2377..e0e1ad97 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -363,5 +363,4 @@ fos_js_routing: - import - developer - howto - - about - logout -- cgit v1.2.3 From 995c204428dd6be04d2bff1d5e17f3e95268f44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 18 Nov 2016 19:21:31 +0100 Subject: Added shortcut --- app/config/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 48496bc2..53c26beb 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -364,3 +364,4 @@ fos_js_routing: - developer - howto - logout + - new -- cgit v1.2.3 From c1683778abb662ee4fcca2fca204bb00c92b8f13 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 20 Nov 2016 20:23:30 +0100 Subject: Add ability to use Redis with password --- app/config/parameters.yml.dist | 1 + 1 file changed, 1 insertion(+) (limited to 'app/config') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 7a22cb98..f821f2a8 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -55,3 +55,4 @@ parameters: redis_host: localhost redis_port: 6379 redis_path: null + redis_password: null -- cgit v1.2.3 From 7aab0ecf2f78ce58f28b53c1fa19bfd824cc3cd7 Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Thu, 29 Sep 2016 10:14:43 +0200 Subject: Added authentication for restricted access articles Fix #438. Thank you so much @bdunogier --- app/config/parameters.yml.dist | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/config') diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index f821f2a8..a4dc0bde 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -56,3 +56,6 @@ parameters: redis_port: 6379 redis_path: null redis_password: null + + # sites credentials + sites_credentials: {} -- cgit v1.2.3 From 5066c3e066ad67788bdf6edac9e80cab614a2d4d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 21 Nov 2016 15:12:11 +0100 Subject: Re-use FOSUser master branch --- app/config/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 487e934b..5f939ab5 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -210,6 +210,7 @@ fos_user: from_email: address: "%from_email%" sender_name: wallabag + fos_oauth_server: db_driver: orm client_class: Wallabag\ApiBundle\Entity\Client @@ -217,10 +218,10 @@ fos_oauth_server: refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken auth_code_class: Wallabag\ApiBundle\Entity\AuthCode service: - user_provider: fos_user.user_manager + user_provider: fos_user.user_provider.username_email options: refresh_token_lifetime: 1209600 - + scheb_two_factor: trusted_computer: enabled: true -- cgit v1.2.3 From 66e9dde0dc0ba5f554231a7a968ef5b530a0563f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 23 Nov 2016 14:40:00 +0100 Subject: Fixed logout shortcut --- app/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 5f939ab5..6b1ed056 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -366,5 +366,5 @@ fos_js_routing: - import - developer - howto - - logout + - fos_user_security_logout - new -- cgit v1.2.3 From 24879db1f73c85b121702ba8c6ea36bae285c7c3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 12 Dec 2016 17:41:03 +0100 Subject: Add default value for list_mode --- app/config/config.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 6b1ed056..d52f37c8 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -51,6 +51,8 @@ wallabag_core: rss_limit: 50 reading_speed: 1 cache_lifetime: 10 + action_mark_as_read: 1 + list_mode: 1 fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. -- cgit v1.2.3 From 21e7ccef3d960f4747d58fc0c9e081618e9451eb Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 14 Dec 2016 11:54:30 +0100 Subject: Fix tests & deprecation notice --- app/config/routing.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/config') diff --git a/app/config/routing.yml b/app/config/routing.yml index eedf51d5..0bd2d130 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -17,10 +17,6 @@ wallabag_api: type: annotation prefix: / -wallabag_api: - resource: "@WallabagApiBundle/Resources/config/routing.yml" - prefix: / - app: resource: "@WallabagCoreBundle/Controller/" type: annotation -- cgit v1.2.3 From 99712e5d8509e624b2c81dfd10226babad446a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 8 Dec 2016 13:58:04 +0100 Subject: Added QoS for RabbitMQ --- app/config/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index d52f37c8..2dd5c1de 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -300,6 +300,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.pocket' callback: wallabag_import.consumer.amqp.pocket + qos_options: {prefetch_count: 10} import_readability: connection: default exchange_options: @@ -308,6 +309,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.readability' callback: wallabag_import.consumer.amqp.readability + qos_options: {prefetch_count: 10} import_instapaper: connection: default exchange_options: @@ -316,6 +318,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.instapaper' callback: wallabag_import.consumer.amqp.instapaper + qos_options: {prefetch_count: 10} import_pinboard: connection: default exchange_options: @@ -324,6 +327,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.pinboard' callback: wallabag_import.consumer.amqp.pinboard + qos_options: {prefetch_count: 10} import_wallabag_v1: connection: default exchange_options: @@ -332,6 +336,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.wallabag_v1' callback: wallabag_import.consumer.amqp.wallabag_v1 + qos_options: {prefetch_count: 10} import_wallabag_v2: connection: default exchange_options: @@ -340,6 +345,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.wallabag_v2' callback: wallabag_import.consumer.amqp.wallabag_v2 + qos_options: {prefetch_count: 10} import_firefox: connection: default exchange_options: @@ -348,6 +354,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.firefox' callback: wallabag_import.consumer.amqp.firefox + qos_options: {prefetch_count: 10} import_chrome: connection: default exchange_options: @@ -356,6 +363,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.chrome' callback: wallabag_import.consumer.amqp.chrome + qos_options: {prefetch_count: 10} fos_js_routing: routes_to_expose: -- cgit v1.2.3 From 881b0578e782e947706124a4e1d625a3dd3ddc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 15 Dec 2016 21:58:20 +0100 Subject: Moved RabbitMQ QoS to parameters --- app/config/config.yml | 16 ++++++++-------- app/config/parameters.yml.dist | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 2dd5c1de..591b5294 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -300,7 +300,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.pocket' callback: wallabag_import.consumer.amqp.pocket - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_readability: connection: default exchange_options: @@ -309,7 +309,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.readability' callback: wallabag_import.consumer.amqp.readability - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_instapaper: connection: default exchange_options: @@ -318,7 +318,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.instapaper' callback: wallabag_import.consumer.amqp.instapaper - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_pinboard: connection: default exchange_options: @@ -327,7 +327,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.pinboard' callback: wallabag_import.consumer.amqp.pinboard - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_wallabag_v1: connection: default exchange_options: @@ -336,7 +336,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.wallabag_v1' callback: wallabag_import.consumer.amqp.wallabag_v1 - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_wallabag_v2: connection: default exchange_options: @@ -345,7 +345,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.wallabag_v2' callback: wallabag_import.consumer.amqp.wallabag_v2 - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_firefox: connection: default exchange_options: @@ -354,7 +354,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.firefox' callback: wallabag_import.consumer.amqp.firefox - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_chrome: connection: default exchange_options: @@ -363,7 +363,7 @@ old_sound_rabbit_mq: queue_options: name: 'wallabag.import.chrome' callback: wallabag_import.consumer.amqp.chrome - qos_options: {prefetch_count: 10} + qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} fos_js_routing: 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: rabbitmq_port: 5672 rabbitmq_user: guest rabbitmq_password: guest + rabbitmq_prefetch_count: 10 # Redis processing redis_scheme: tcp -- cgit v1.2.3 From 0bacc9e175d57676bf23348cf039cb3f214dfb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 30 Dec 2016 13:23:02 +0100 Subject: Fixed API error 'No matching accepted Response format could be determined' --- app/config/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 591b5294..05c82e43 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -148,9 +148,9 @@ fos_rest: format_listener: enabled: true rules: - - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: false, prefer_extension: false } - - { path: "^/api", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } - - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false } + - { path: "^/api", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } + - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener # so we need to add custom rule for custom api export but also for all other routes of the application... - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false } -- cgit v1.2.3