From 886b28828d163869744bbd6230269ead99bef756 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 17 May 2024 10:11:02 +0100 Subject: [PATCH] [DOCS] queue_job: make clear the relationship with workers amount Adding docs for https://github.com/OCA/queue/issues/431#issuecomment-1172328590, which could be surprising and, if not taken into account, could easily block any DB using queue_job. @moduon MT-6106 --- queue_job/README.rst | 5 +++++ queue_job/readme/CONFIGURE.rst | 5 +++++ queue_job/static/description/index.html | 15 +++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/queue_job/README.rst b/queue_job/README.rst index d3faddd78e..39b665c37b 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -100,6 +100,9 @@ Configuration * Start Odoo with ``--load=web,queue_job`` and ``--workers`` greater than 1. [1]_ +* Keep in mind that the number of workers should be greater than the number of + channels. ``queue_job`` will reuse normal Odoo workers to process jobs. It + will not spawn its own workers. * Using the Odoo configuration file: @@ -114,6 +117,8 @@ Configuration [queue_job] channels = root:2 +* Environment variables have priority over the configuration file. + * Confirm the runner is starting correctly by checking the odoo log file: .. code-block:: diff --git a/queue_job/readme/CONFIGURE.rst b/queue_job/readme/CONFIGURE.rst index b9547b9465..fdd3dd1598 100644 --- a/queue_job/readme/CONFIGURE.rst +++ b/queue_job/readme/CONFIGURE.rst @@ -10,6 +10,9 @@ * Start Odoo with ``--load=web,queue_job`` and ``--workers`` greater than 1. [1]_ +* Keep in mind that the number of workers should be greater than the number of + channels. ``queue_job`` will reuse normal Odoo workers to process jobs. It + will not spawn its own workers. * Using the Odoo configuration file: @@ -24,6 +27,8 @@ [queue_job] channels = root:2 +* Environment variables have priority over the configuration file. + * Confirm the runner is starting correctly by checking the odoo log file: .. code-block:: diff --git a/queue_job/static/description/index.html b/queue_job/static/description/index.html index 557244314a..8007a79563 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -457,6 +458,9 @@

Configuration

and --workers greater than 1. [1] +
  • Keep in mind that the number of workers should be greater than the number of +channels. queue_job will reuse normal Odoo workers to process jobs. It +will not spawn its own workers.
  • Using the Odoo configuration file:
  • @@ -470,6 +474,7 @@ 

    Configuration

    channels = root:2
    @@ -954,7 +959,9 @@ 

    Contributors

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.