From a04ea9be5cb10ed8f9f240a19bf46ec2cc148d91 Mon Sep 17 00:00:00 2001 From: achulii <96129046+achulii@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:36:28 +0100 Subject: [PATCH] [MIG] queue_job_cron_jobrunner: Migration to 18.0 --- queue_job_cron_jobrunner/README.rst | 10 +++++----- queue_job_cron_jobrunner/__manifest__.py | 2 +- queue_job_cron_jobrunner/data/ir_cron.xml | 1 - queue_job_cron_jobrunner/models/queue_job.py | 16 ++-------------- .../static/description/index.html | 17 ++++++++++------- queue_job_cron_jobrunner/views/ir_cron.xml | 2 +- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/queue_job_cron_jobrunner/README.rst b/queue_job_cron_jobrunner/README.rst index 4a4dd3d7dd..0017143f39 100644 --- a/queue_job_cron_jobrunner/README.rst +++ b/queue_job_cron_jobrunner/README.rst @@ -17,13 +17,13 @@ Queue Job Cron Jobrunner :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github - :target: https://github.com/OCA/queue/tree/17.0/queue_job_cron_jobrunner + :target: https://github.com/OCA/queue/tree/18.0/queue_job_cron_jobrunner :alt: OCA/queue .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/queue-17-0/queue-17-0-queue_job_cron_jobrunner + :target: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-queue_job_cron_jobrunner :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -98,7 +98,7 @@ 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 -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -138,6 +138,6 @@ Current `maintainer `__: |maintainer-ivantodorovich| -This module is part of the `OCA/queue `_ project on GitHub. +This module is part of the `OCA/queue `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/queue_job_cron_jobrunner/__manifest__.py b/queue_job_cron_jobrunner/__manifest__.py index 964bbd0511..ff54857efd 100644 --- a/queue_job_cron_jobrunner/__manifest__.py +++ b/queue_job_cron_jobrunner/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Queue Job Cron Jobrunner", "summary": "Run jobs without a dedicated JobRunner", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Alpha", "author": "Camptocamp SA, Odoo Community Association (OCA)", "maintainers": ["ivantodorovich"], diff --git a/queue_job_cron_jobrunner/data/ir_cron.xml b/queue_job_cron_jobrunner/data/ir_cron.xml index 33943c9264..7653a70ab2 100644 --- a/queue_job_cron_jobrunner/data/ir_cron.xml +++ b/queue_job_cron_jobrunner/data/ir_cron.xml @@ -9,6 +9,5 @@ 1 days - -1 diff --git a/queue_job_cron_jobrunner/models/queue_job.py b/queue_job_cron_jobrunner/models/queue_job.py index 2e19556b95..28ed243e7c 100644 --- a/queue_job_cron_jobrunner/models/queue_job.py +++ b/queue_job_cron_jobrunner/models/queue_job.py @@ -8,15 +8,11 @@ from psycopg2 import OperationalError -from odoo import _, api, models, tools +from odoo import api, models, tools from odoo.service.model import PG_CONCURRENCY_ERRORS_TO_RETRY from odoo.addons.queue_job.controllers.main import PG_RETRY -from odoo.addons.queue_job.exception import ( - FailedJobError, - NothingToDoJob, - RetryableJobError, -) +from odoo.addons.queue_job.exception import FailedJobError, RetryableJobError from odoo.addons.queue_job.job import Job _logger = logging.getLogger(__name__) @@ -79,14 +75,6 @@ def _process(self, commit=False): job.store() _logger.debug("%s OperationalError, postponed", job) - except NothingToDoJob as err: - if str(err): - msg = str(err) - else: - msg = _("Job interrupted and set to Done: nothing to do.") - job.set_done(msg) - job.store() - except RetryableJobError as err: # delay the job later, requeue job.postpone(result=str(err), seconds=5) diff --git a/queue_job_cron_jobrunner/static/description/index.html b/queue_job_cron_jobrunner/static/description/index.html index a5ef5391ca..d1b006afaa 100644 --- a/queue_job_cron_jobrunner/static/description/index.html +++ b/queue_job_cron_jobrunner/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 { @@ -368,7 +369,7 @@

Queue Job Cron Jobrunner

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a9ff3bc27cff35398d24b6b1dc300a5b8acc9c06d417b1969b1c2e2974e39ec9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 OCA/queue Translate me on Weblate Try me on Runboat

+

Alpha License: AGPL-3 OCA/queue Translate me on Weblate Try me on Runboat

This module implements a simple queue.job runner using ir.cron triggers.

It’s meant to be used on environments where the regular job runner can’t @@ -440,7 +441,7 @@

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 -feedback.

+feedback.

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

@@ -466,13 +467,15 @@

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.

Current maintainer:

ivantodorovich

-

This module is part of the OCA/queue project on GitHub.

+

This module is part of the OCA/queue project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/queue_job_cron_jobrunner/views/ir_cron.xml b/queue_job_cron_jobrunner/views/ir_cron.xml index 672123ecf8..e87a0d2a1c 100644 --- a/queue_job_cron_jobrunner/views/ir_cron.xml +++ b/queue_job_cron_jobrunner/views/ir_cron.xml @@ -9,7 +9,7 @@ ir.cron - +