diff --git a/README.md b/README.md index 90523113a3..de24f541a8 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[queue_job](queue_job/) | 17.0.1.0.3 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue +[queue_job](queue_job/) | 17.0.1.0.4 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue [queue_job_cron](queue_job_cron/) | 17.0.1.0.0 | | Scheduled Actions as Queue Jobs [queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 17.0.1.0.0 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Run jobs without a dedicated JobRunner [queue_job_subscribe](queue_job_subscribe/) | 17.0.1.0.0 | | Control which users are subscribed to queue job notifications diff --git a/queue_job/README.rst b/queue_job/README.rst index 54f1efe034..3eff5d941d 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -7,7 +7,7 @@ Job Queue !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b9e93efc8b0afac10d4666c9b35305aac8ac679488e6ac1ad649adb7bac65f4a + !! source digest: sha256:b8379c2bc14aad086397442fdeecc1e9cc2ce8aa0594147b2059ca748752738f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png @@ -81,6 +81,36 @@ Features: .. contents:: :local: +Use Cases / Context +=================== + +Odoo treats task synchronously, like when you import a list of products +it will treat each line in one big task. "Queue job" gives you the +ability to detail big tasks in many smaller ones. + +Imagine you have a lot of data to change for thousand orders, you can do +it in one step and cause a heavy load on the server, and this may affect +the performance of Odoo. With queue_job you can divide the work in jobs +and run thousand jobs (one job for each orders). An other benefit is if +one line failed it doesn't block the processing of the others, as the +jobs are independent. Plus you can schedule the jobs and set a number of +retries. + +Here are some community usage examples: + +- Mass sending invoices: + `account_invoice_mass_sending `__ +- Import data in the background: + `base_import_async `__ +- Export data in the background: + `base_export_async `__ +- Generate contract invoices with jobs: + `contract_queue_job `__ +- Generate partner invoices with + jobs:`partner_invoicing_mode `__ +- Process the Sales Automatic Workflow actions with jobs: + `sale_automatic_workflow_job `__ + Installation ============ diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index d0de1718fb..d5c392fa5b 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "17.0.1.0.3", + "version": "17.0.1.0.4", "author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/queue", "license": "LGPL-3", diff --git a/queue_job/static/description/index.html b/queue_job/static/description/index.html index 8175ddda35..767096d4d7 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 { @@ -366,7 +367,7 @@

Job Queue

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b9e93efc8b0afac10d4666c9b35305aac8ac679488e6ac1ad649adb7bac65f4a +!! source digest: sha256:b8379c2bc14aad086397442fdeecc1e9cc2ce8aa0594147b2059ca748752738f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: LGPL-3 OCA/queue Translate me on Weblate Try me on Runboat

This addon adds an integrated Job Queue to Odoo.

@@ -414,40 +415,69 @@

Job Queue

Table of contents

+
+

Use Cases / Context

+

Odoo treats task synchronously, like when you import a list of products +it will treat each line in one big task. “Queue job” gives you the +ability to detail big tasks in many smaller ones.

+

Imagine you have a lot of data to change for thousand orders, you can do +it in one step and cause a heavy load on the server, and this may affect +the performance of Odoo. With queue_job you can divide the work in jobs +and run thousand jobs (one job for each orders). An other benefit is if +one line failed it doesn’t block the processing of the others, as the +jobs are independent. Plus you can schedule the jobs and set a number of +retries.

+

Here are some community usage examples:

+ +
-

Installation

+

Installation

Be sure to have the requests library.

-

Configuration

+

Configuration

  • Using environment variables and command line:
    • Adjust environment variables (optional):
-

Usage

+

Usage

To use this module, you need to:

  1. Go to Job Queue menu
-

Developers

+

Developers

-

Delaying jobs

+

Delaying jobs

The fast way to enqueue a job for a method is to use with_delay() on a record or model:

@@ -596,7 +626,7 @@ 

Delaying jobs

would be shown).

-

Enqueing Job Options

+

Enqueing Job Options

  • priority: default is 10, the closest it is to 0, the faster it will be executed
  • @@ -615,7 +645,7 @@

    Enqueing Job Options

-

Configure default options for jobs

+

Configure default options for jobs

In earlier versions, jobs could be configured using the @job decorator. This is now obsolete, they can be configured using optional queue.job.function and queue.job.channel XML records.

@@ -743,7 +773,7 @@

Configure default options for job delaying any jobs.

-

Testing

+

Testing

Asserting enqueued jobs

The recommended way to test jobs, rather than running them directly and synchronously is to split the tests in two parts:

@@ -858,7 +888,7 @@

Testing

synchronously

-

Patterns

+

Patterns

Through the time, two main patterns emerged:

  1. For data exposed to users, a model should store the data and the @@ -885,7 +915,7 @@

    Patterns

-

Known issues / Roadmap

+

Known issues / Roadmap

  • After creating a new database or installing queue_job on an existing database, Odoo must be restarted for the runner to detect @@ -907,9 +937,9 @@

    Known issues / Roadmap

-

Changelog

+

Changelog

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -928,16 +958,16 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Camptocamp
  • ACSONE SA/NV
-

Contributors

+

Contributors

-

Maintainers

+

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.