From be51905d5466fb5855b97fd192257fa3010b8898 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Wed, 11 Jun 2025 11:52:51 +0200 Subject: [PATCH 1/6] [IMP] queue_job: filter for retried jobs --- queue_job/views/queue_job_views.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/queue_job/views/queue_job_views.xml b/queue_job/views/queue_job_views.xml index 79aec95bc2..ecebb8f0af 100644 --- a/queue_job/views/queue_job_views.xml +++ b/queue_job/views/queue_job_views.xml @@ -253,6 +253,12 @@ domain="[('state', '=', 'cancelled')]" /> + + Date: Wed, 11 Jun 2025 12:13:08 +0200 Subject: [PATCH 2/6] [IMP] queue_job: set the columns optional in list view --- queue_job/views/queue_job_views.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/queue_job/views/queue_job_views.xml b/queue_job/views/queue_job_views.xml index 79aec95bc2..e966966151 100644 --- a/queue_job/views/queue_job_views.xml +++ b/queue_job/views/queue_job_views.xml @@ -154,23 +154,23 @@ decoration-muted="state == 'done'" > - + - + - - + + - - - - + + + + From a82cc620ca0b7aa9c65c8094ecce40ce41f839c0 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 12 Jun 2025 13:40:47 +0000 Subject: [PATCH 3/6] [UPD] Update queue_job.pot --- queue_job/i18n/queue_job.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/queue_job/i18n/queue_job.pot b/queue_job/i18n/queue_job.pot index 31eddb3683..b85a205ddd 100644 --- a/queue_job/i18n/queue_job.pot +++ b/queue_job/i18n/queue_job.pot @@ -882,6 +882,11 @@ msgstr "" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." From 7eb48b92416d5cb9da485219df327bbe066bde9e Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 12 Jun 2025 13:43:13 +0000 Subject: [PATCH 4/6] [BOT] post-merge updates --- README.md | 2 +- queue_job/README.rst | 8 +++- queue_job/__manifest__.py | 2 +- queue_job/static/description/index.html | 52 ++++++++++++++----------- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 14644122ad..d0f01584ef 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [base_export_async](base_export_async/) | 14.0.1.0.1 | | Asynchronous export with job queue [base_import_async](base_import_async/) | 14.0.1.0.2 | | Import CSV files in the background [export_async_schedule](export_async_schedule/) | 14.0.1.0.1 | guewen | Generate and send exports by emails on a schedule -[queue_job](queue_job/) | 14.0.3.11.0 | guewen | Job Queue +[queue_job](queue_job/) | 14.0.3.12.0 | guewen | Job Queue [queue_job_batch](queue_job_batch/) | 14.0.1.0.2 | | Job Queue Batch [queue_job_context](queue_job_context/) | 14.0.1.0.1 | AshishHirapara | Queue Job, prepare context before enqueue keys [queue_job_cron](queue_job_cron/) | 14.0.2.0.0 | | Scheduled Actions as Queue Jobs diff --git a/queue_job/README.rst b/queue_job/README.rst index fa60a3e401..3bd06b824a 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ========= Job Queue ========= @@ -7,13 +11,13 @@ Job Queue !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:3aacd026b8d46dea0a3a200eecd16eb6592a97b8d31a84e6155481a3e5c223c6 + !! source digest: sha256:c6f84e963de902ae65caf0f535e67f655c2bc24dbd6b6768f2b16c67195a2c43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png :target: https://odoo-community.org/page/development-status :alt: Mature -.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index 998201cba0..b074f13c9f 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "14.0.3.11.0", + "version": "14.0.3.12.0", "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 4f5724dfaf..c015a8fb2d 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -3,7 +3,7 @@ -Job Queue +README.rst -
-

Job Queue

+
+ + +Odoo Community Association + +
+

Job Queue

-

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

+

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

This addon adds an integrated Job Queue to Odoo.

It allows to postpone method calls executed asynchronously.

Jobs are executed in the background by a Jobrunner, in their own transaction.

@@ -441,11 +446,11 @@

Job Queue

-

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:

@@ -614,7 +619,7 @@ 

Delaying jobs

-

Enqueing Job Options

+

Enqueing Job Options

  • priority: default is 10, the closest it is to 0, the faster it will be executed
  • @@ -631,7 +636,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.

@@ -766,7 +771,7 @@

Configure default options for job without 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:

@@ -886,14 +891,14 @@

Testing

-

Tips and tricks

+

Tips and tricks

  • Idempotency (https://www.restapitutorial.com/lessons/idempotency.html): The queue_job should be idempotent so they can be retried several times without impact on the data.
  • The job should test at the very beginning its relevance: the moment the job will be executed is unknown by design. So the first task of a job should be to check if the related work is still relevant at the moment of the execution.
-

Patterns

+

Patterns

Through the time, two main patterns emerged:

  1. For data exposed to users, a model should store the data and the model should be the creator of the job. The job is kept hidden from the users
  2. @@ -903,7 +908,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 it.
  • @@ -924,7 +929,7 @@

    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 @@ -954,16 +959,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 @@ -995,5 +1000,6 @@

Maintainers

+
From 731b3056f864216231d5f851abe24e74e414937e Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 12 Jun 2025 13:43:22 +0000 Subject: [PATCH 5/6] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-14.0/queue-14.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-queue_job/ --- queue_job/i18n/de.po | 5 +++++ queue_job/i18n/es.po | 5 +++++ queue_job/i18n/it.po | 5 +++++ queue_job/i18n/ro.po | 5 +++++ queue_job/i18n/zh_CN.po | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/queue_job/i18n/de.po b/queue_job/i18n/de.po index f0bb8cdb05..10ddd4452a 100644 --- a/queue_job/i18n/de.po +++ b/queue_job/i18n/de.po @@ -908,6 +908,11 @@ msgstr "" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." diff --git a/queue_job/i18n/es.po b/queue_job/i18n/es.po index fdeab442e1..bbe3a4b314 100644 --- a/queue_job/i18n/es.po +++ b/queue_job/i18n/es.po @@ -888,6 +888,11 @@ msgstr "" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." diff --git a/queue_job/i18n/it.po b/queue_job/i18n/it.po index ccb189184c..a659d5caa8 100644 --- a/queue_job/i18n/it.po +++ b/queue_job/i18n/it.po @@ -892,6 +892,11 @@ msgstr "Durata (s)" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." diff --git a/queue_job/i18n/ro.po b/queue_job/i18n/ro.po index c1bb27ef03..b96a9cd281 100644 --- a/queue_job/i18n/ro.po +++ b/queue_job/i18n/ro.po @@ -891,6 +891,11 @@ msgstr "" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." diff --git a/queue_job/i18n/zh_CN.po b/queue_job/i18n/zh_CN.po index 68746073b8..f4f8007f42 100644 --- a/queue_job/i18n/zh_CN.po +++ b/queue_job/i18n/zh_CN.po @@ -903,6 +903,11 @@ msgstr "" msgid "Time required to execute this job in seconds. Average when grouped." msgstr "" +#. module: queue_job +#: model_terms:ir.ui.view,arch_db:queue_job.view_queue_job_search +msgid "Tried many times" +msgstr "" + #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__activity_exception_decoration msgid "Type of the exception activity on record." From d522451d30abc68e745d746a3b29a8fa56d6baa8 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 12 Jun 2025 13:45:51 +0000 Subject: [PATCH 6/6] [BOT] post-merge updates --- README.md | 2 +- queue_job/README.rst | 2 +- queue_job/__manifest__.py | 2 +- queue_job/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d0f01584ef..a0d01e4ece 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [base_export_async](base_export_async/) | 14.0.1.0.1 | | Asynchronous export with job queue [base_import_async](base_import_async/) | 14.0.1.0.2 | | Import CSV files in the background [export_async_schedule](export_async_schedule/) | 14.0.1.0.1 | guewen | Generate and send exports by emails on a schedule -[queue_job](queue_job/) | 14.0.3.12.0 | guewen | Job Queue +[queue_job](queue_job/) | 14.0.3.13.0 | guewen | Job Queue [queue_job_batch](queue_job_batch/) | 14.0.1.0.2 | | Job Queue Batch [queue_job_context](queue_job_context/) | 14.0.1.0.1 | AshishHirapara | Queue Job, prepare context before enqueue keys [queue_job_cron](queue_job_cron/) | 14.0.2.0.0 | | Scheduled Actions as Queue Jobs diff --git a/queue_job/README.rst b/queue_job/README.rst index 3bd06b824a..cc9c8a29b6 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -11,7 +11,7 @@ Job Queue !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:c6f84e963de902ae65caf0f535e67f655c2bc24dbd6b6768f2b16c67195a2c43 + !! source digest: sha256:24bc5746fee55884d7fcb4f867d8d62ab10502eaf019f69ac5b03132c6da088b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index b074f13c9f..2aeda46898 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "14.0.3.12.0", + "version": "14.0.3.13.0", "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 c015a8fb2d..8c57c58f00 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -372,7 +372,7 @@

Job Queue

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

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

This addon adds an integrated Job Queue to Odoo.