From a6375fb818c8eec44a0b98bc8903e2d1d9e698a0 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Wed, 25 Jun 2025 09:24:52 +0200 Subject: [PATCH 1/6] [IMP] queue_job: add index for efficient autovacuum --- queue_job/models/queue_job.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/queue_job/models/queue_job.py b/queue_job/models/queue_job.py index 23254fef54..465d5fd1d7 100644 --- a/queue_job/models/queue_job.py +++ b/queue_job/models/queue_job.py @@ -7,7 +7,7 @@ from odoo import _, api, exceptions, fields, models from odoo.osv import expression -from odoo.tools import config, html_escape +from odoo.tools import config, html_escape, index_exists from odoo.addons.base_sparse_field.models.fields import Serialized @@ -128,16 +128,21 @@ class QueueJob(models.Model): worker_pid = fields.Integer(readonly=True) def init(self): - self._cr.execute( - "SELECT indexname FROM pg_indexes WHERE indexname = %s ", - ("queue_job_identity_key_state_partial_index",), - ) - if not self._cr.fetchone(): + index_1 = "queue_job_identity_key_state_partial_index" + index_2 = "queue_job_channel_date_done_date_created_index" + if not index_exists(self._cr, index_1): + # Used by Job.job_record_with_same_identity_key self._cr.execute( "CREATE INDEX queue_job_identity_key_state_partial_index " "ON queue_job (identity_key) WHERE state in ('pending', " "'enqueued', 'wait_dependencies') AND identity_key IS NOT NULL;" ) + if not index_exists(self._cr, index_2): + # Used by .autovacuum + self._cr.execute( + "CREATE INDEX queue_job_channel_date_done_date_created_index " + "ON queue_job (channel, date_done, date_created);" + ) @api.depends("dependencies") def _compute_dependency_graph(self): @@ -399,6 +404,7 @@ def autovacuum(self): ("date_cancelled", "<=", deadline), ("channel", "=", channel.complete_name), ], + order="date_done, date_created", limit=1000, ) if jobs: From 580f7494a4704f57d69d323e075cd7745c596268 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 25 Jun 2025 10:54:53 +0000 Subject: [PATCH 2/6] [UPD] Update queue_job.pot --- queue_job/i18n/queue_job.pot | 6 ------ 1 file changed, 6 deletions(-) diff --git a/queue_job/i18n/queue_job.pot b/queue_job/i18n/queue_job.pot index b1e7e5750f..3e523934ed 100644 --- a/queue_job/i18n/queue_job.pot +++ b/queue_job/i18n/queue_job.pot @@ -385,7 +385,6 @@ msgstr "" #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -736,11 +735,6 @@ msgstr "" msgid "Retry Pattern (serialized)" msgstr "" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" From 47a6b7d91520114e70e208886715b68d33004e1a Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 25 Jun 2025 10:54:54 +0000 Subject: [PATCH 3/6] [UPD] Update queue_job_batch.pot --- queue_job_batch/i18n/queue_job_batch.pot | 6 ------ 1 file changed, 6 deletions(-) diff --git a/queue_job_batch/i18n/queue_job_batch.pot b/queue_job_batch/i18n/queue_job_batch.pot index 6575846a63..05e2bc595e 100644 --- a/queue_job_batch/i18n/queue_job_batch.pot +++ b/queue_job_batch/i18n/queue_job_batch.pot @@ -146,7 +146,6 @@ msgstr "" #. module: queue_job_batch #: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_error -#: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -301,11 +300,6 @@ msgstr "" msgid "Responsible User" msgstr "" -#. module: queue_job_batch -#: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: queue_job_batch #: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__state #: model_terms:ir.ui.view,arch_db:queue_job_batch.view_queue_job_batch_search From 45dabc7e4f5c0e2842c91f352f94d43272322f42 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 25 Jun 2025 10:56:55 +0000 Subject: [PATCH 4/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 33a8d0cfe9..5ac07d5520 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [base_import_async](base_import_async/) | 18.0.1.0.0 | | Import CSV files in the background -[queue_job](queue_job/) | 18.0.1.6.1 | guewen | Job Queue +[queue_job](queue_job/) | 18.0.1.7.0 | guewen | Job Queue [queue_job_batch](queue_job_batch/) | 18.0.1.0.0 | | Job Queue Batch [queue_job_cron](queue_job_cron/) | 18.0.1.1.1 | | Scheduled Actions as Queue Jobs [queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 18.0.1.0.0 | ivantodorovich | Run jobs without a dedicated JobRunner diff --git a/queue_job/README.rst b/queue_job/README.rst index c3ac6a5572..0ac718620f 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:466f6aa00ff9f233be68be1eb6a109af5048ea856cc3c0086a7b479b32c83f00 + !! source digest: sha256:1546ea44a63ecafe2dcee75567a04b4df20b00c51c1494a42056b388ddec15ad !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index 620417c563..4ef73c0421 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "18.0.1.6.1", + "version": "18.0.1.7.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 c6a196889e..cd92a52e19 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:466f6aa00ff9f233be68be1eb6a109af5048ea856cc3c0086a7b479b32c83f00 +!! source digest: sha256:1546ea44a63ecafe2dcee75567a04b4df20b00c51c1494a42056b388ddec15ad !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This addon adds an integrated Job Queue to Odoo.

From f8c463a503b725d72ae4c03661ec3977a7296693 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 25 Jun 2025 10:57:05 +0000 Subject: [PATCH 5/6] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-18.0/queue-18.0-queue_job_batch Translate-URL: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-queue_job_batch/ --- queue_job_batch/i18n/es.po | 6 ------ queue_job_batch/i18n/fr.po | 6 ------ queue_job_batch/i18n/it.po | 9 +++------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/queue_job_batch/i18n/es.po b/queue_job_batch/i18n/es.po index 9e401cdec9..dd5007b5cd 100644 --- a/queue_job_batch/i18n/es.po +++ b/queue_job_batch/i18n/es.po @@ -149,7 +149,6 @@ msgstr "si está marcada, mensajes nuevos requieren su atención." #. module: queue_job_batch #: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_error -#: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Si está seleccionado, algunos mensajes tienen un error de entrega." @@ -304,11 +303,6 @@ msgstr "Cola de Trabajo" msgid "Responsible User" msgstr "Usuario Responsable" -#. module: queue_job_batch -#: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: queue_job_batch #: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__state #: model_terms:ir.ui.view,arch_db:queue_job_batch.view_queue_job_batch_search diff --git a/queue_job_batch/i18n/fr.po b/queue_job_batch/i18n/fr.po index f3d6a854a5..4e96f7a494 100644 --- a/queue_job_batch/i18n/fr.po +++ b/queue_job_batch/i18n/fr.po @@ -149,7 +149,6 @@ msgstr "Si coché, de nouveaux messages requièrent votre attention." #. module: queue_job_batch #: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_error -#: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Si coché, des messages n'ont pas pu être livré." @@ -304,11 +303,6 @@ msgstr "File d'attente des travaux" msgid "Responsible User" msgstr "Responsable" -#. module: queue_job_batch -#: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: queue_job_batch #: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__state #: model_terms:ir.ui.view,arch_db:queue_job_batch.view_queue_job_batch_search diff --git a/queue_job_batch/i18n/it.po b/queue_job_batch/i18n/it.po index 58fecf0436..9b22cb6747 100644 --- a/queue_job_batch/i18n/it.po +++ b/queue_job_batch/i18n/it.po @@ -149,7 +149,6 @@ msgstr "Se selezionata, nuovi messaggi richiedono attenzione." #. module: queue_job_batch #: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_error -#: model:ir.model.fields,help:queue_job_batch.field_queue_job_batch__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna." @@ -304,11 +303,6 @@ msgstr "Lavoro in coda" msgid "Responsible User" msgstr "Utente responsabile" -#. module: queue_job_batch -#: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__message_has_sms_error -msgid "SMS Delivery error" -msgstr "Errore consegna SMS" - #. module: queue_job_batch #: model:ir.model.fields,field_description:queue_job_batch.field_queue_job_batch__state #: model_terms:ir.ui.view,arch_db:queue_job_batch.view_queue_job_batch_search @@ -357,6 +351,9 @@ msgstr "Utente" msgid "View all job batches" msgstr "Vedi tutti i gruppi lavoro" +#~ msgid "SMS Delivery error" +#~ msgstr "Errore consegna SMS" + #~ msgid "Draft" #~ msgstr "Bozza" From 8a00bbb8185493a4767c8fab1cbf19c27f9f1941 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 25 Jun 2025 10:57:05 +0000 Subject: [PATCH 6/6] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-18.0/queue-18.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-queue_job/ --- queue_job/i18n/de.po | 9 +++------ queue_job/i18n/es.po | 9 +++------ queue_job/i18n/it.po | 9 +++------ queue_job/i18n/tr.po | 13 +++++-------- queue_job/i18n/tr_TR.po | 6 ------ queue_job/i18n/zh_CN.po | 9 +++------ 6 files changed, 17 insertions(+), 38 deletions(-) diff --git a/queue_job/i18n/de.po b/queue_job/i18n/de.po index 2af1add490..7db5bc7ecf 100644 --- a/queue_job/i18n/de.po +++ b/queue_job/i18n/de.po @@ -390,7 +390,6 @@ msgstr "" #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" "Wenn das Häkchen gesetzt ist, gibt es einige Nachrichten mit einem " @@ -748,11 +747,6 @@ msgstr "" msgid "Retry Pattern (serialized)" msgstr "" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "Fehler bei der SMS Nachrichtenübermittlung" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" @@ -929,6 +923,9 @@ msgstr "Assistent zur erneuten Einreihung einer Job-Auswahl" msgid "Worker Pid" msgstr "" +#~ msgid "SMS Delivery error" +#~ msgstr "Fehler bei der SMS Nachrichtenübermittlung" + #, python-format #~ msgid "Job interrupted and set to Done: nothing to do." #~ msgstr "Job unterbrochen und als Erledigt markiert: Es ist nicht zu tun." diff --git a/queue_job/i18n/es.po b/queue_job/i18n/es.po index 60c0c67c57..a338ecafd4 100644 --- a/queue_job/i18n/es.po +++ b/queue_job/i18n/es.po @@ -395,7 +395,6 @@ msgstr "" #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Si se encuentra seleccionado, algunos mensajes tienen error de envío." @@ -756,11 +755,6 @@ msgstr "Patrón de reintentos" msgid "Retry Pattern (serialized)" msgstr "Patrón de reintentos (en serie)" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "Error de entrega del SMS" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" @@ -947,6 +941,9 @@ msgstr "Asistente para volver a poner en cola una selección de trabajos" msgid "Worker Pid" msgstr "Pid del trabajador" +#~ msgid "SMS Delivery error" +#~ msgstr "Error de entrega del SMS" + #, python-format #~ msgid "Cancelled by %s" #~ msgstr "Cancelado por %s" diff --git a/queue_job/i18n/it.po b/queue_job/i18n/it.po index 3b0bf7cc51..91e3a3cdf6 100644 --- a/queue_job/i18n/it.po +++ b/queue_job/i18n/it.po @@ -392,7 +392,6 @@ msgstr "Se selezionata, nuovi messaggi richiedono attenzione." #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna." @@ -753,11 +752,6 @@ msgstr "Riprova schema" msgid "Retry Pattern (serialized)" msgstr "Riprova schema (serializzato)" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "Errore consegna SMS" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" @@ -946,6 +940,9 @@ msgstr "Procedura guidata per riaccodare una selezione di lavori" msgid "Worker Pid" msgstr "PID worker" +#~ msgid "SMS Delivery error" +#~ msgstr "Errore consegna SMS" + #, python-format #~ msgid "Cancelled by %s" #~ msgstr "Annullata da %s" diff --git a/queue_job/i18n/tr.po b/queue_job/i18n/tr.po index f595a77b44..6083174d22 100644 --- a/queue_job/i18n/tr.po +++ b/queue_job/i18n/tr.po @@ -392,7 +392,6 @@ msgstr "İşaretlenirse, sizi bekleyen mesajlar var." #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "İşaretlenirse, bazı mesajlar teslimat hatası içerir." @@ -753,11 +752,6 @@ msgstr "Deseni Yeniden Dene" msgid "Retry Pattern (serialized)" msgstr "Deseni Yeniden Dene (serileştirilmiş)" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "SMS Teslim hatası" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" @@ -908,8 +902,8 @@ msgid "" msgstr "" "{} için Beklenmeyen İlgili Eylem formatı.\n" "Geçerli format örneği:\n" -"{{\"enable\": True, \"func_name\": \"related_action_foo\", \"kwargs\" {{" -"\"limit\": 10}}}}" +"{{\"enable\": True, \"func_name\": \"related_action_foo\", " +"\"kwargs\" {{\"limit\": 10}}}}" #. module: queue_job #. odoo-python @@ -945,3 +939,6 @@ msgstr "Seçilen işleri yeniden sıraya almak için sihirbaz" #: model:ir.model.fields,field_description:queue_job.field_queue_job__worker_pid msgid "Worker Pid" msgstr "Çalışan Pid" + +#~ msgid "SMS Delivery error" +#~ msgstr "SMS Teslim hatası" diff --git a/queue_job/i18n/tr_TR.po b/queue_job/i18n/tr_TR.po index e14bbeb7b4..222b04e696 100644 --- a/queue_job/i18n/tr_TR.po +++ b/queue_job/i18n/tr_TR.po @@ -387,7 +387,6 @@ msgstr "" #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -741,11 +740,6 @@ msgstr "" msgid "Retry Pattern (serialized)" msgstr "" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" diff --git a/queue_job/i18n/zh_CN.po b/queue_job/i18n/zh_CN.po index 7d2bfb4845..74486e8ade 100644 --- a/queue_job/i18n/zh_CN.po +++ b/queue_job/i18n/zh_CN.po @@ -392,7 +392,6 @@ msgstr "确认后, 出现提示消息。" #. module: queue_job #: model:ir.model.fields,help:queue_job.field_queue_job__message_has_error -#: model:ir.model.fields,help:queue_job.field_queue_job__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "如果勾选此项, 某些消息将会产生传递错误。" @@ -751,11 +750,6 @@ msgstr "重试模式" msgid "Retry Pattern (serialized)" msgstr "重试模式(已序列化)" -#. module: queue_job -#: model:ir.model.fields,field_description:queue_job.field_queue_job__message_has_sms_error -msgid "SMS Delivery error" -msgstr "短信传递错误" - #. module: queue_job #: model:ir.model,name:queue_job.model_queue_jobs_to_done msgid "Set all selected jobs to done" @@ -936,6 +930,9 @@ msgstr "重新排队向导所选的作业" msgid "Worker Pid" msgstr "工作进程PID" +#~ msgid "SMS Delivery error" +#~ msgstr "短信传递错误" + #, python-format #~ msgid "Cancelled by %s" #~ msgstr "被%s取消"