diff --git a/base_cron_exclusion/README.rst b/base_cron_exclusion/README.rst index 4cf6198a0..acf17f4c0 100644 --- a/base_cron_exclusion/README.rst +++ b/base_cron_exclusion/README.rst @@ -23,7 +23,7 @@ Base Cron Exclusion :target: https://runbot.odoo-community.org/runbot/149/14.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module extends the functionality of scheduled actions to allow you to select the ones that should not run simultaneously. @@ -68,6 +68,7 @@ Contributors * Lois Rilo * Jordi Ballester * Bhavesh Odedra +* Christopher Ormaza Maintainers ~~~~~~~~~~~ @@ -85,10 +86,13 @@ promote its widespread use. .. |maintainer-LoisRForgeFlow| image:: https://github.com/LoisRForgeFlow.png?size=40px :target: https://github.com/LoisRForgeFlow :alt: LoisRForgeFlow +.. |maintainer-ChrisOForgeFlow| image:: https://github.com/ChrisOForgeFlow.png?size=40px + :target: https://github.com/ChrisOForgeFlow + :alt: ChrisOForgeFlow -Current `maintainer `__: +Current `maintainers `__: -|maintainer-LoisRForgeFlow| +|maintainer-LoisRForgeFlow| |maintainer-ChrisOForgeFlow| This module is part of the `OCA/server-tools `_ project on GitHub. diff --git a/base_cron_exclusion/__manifest__.py b/base_cron_exclusion/__manifest__.py index e92504cf8..07a977627 100644 --- a/base_cron_exclusion/__manifest__.py +++ b/base_cron_exclusion/__manifest__.py @@ -1,13 +1,13 @@ -# Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com) +# Copyright 2017-21 ForgeFlow S.L. (https://www.forgeflow.com) # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { "name": "Base Cron Exclusion", "summary": "Allow you to select scheduled actions that should not run " "simultaneously.", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "author": "ForgeFlow, Odoo Community Association (OCA)", - "maintainers": ["LoisRForgeFlow"], + "maintainers": ["LoisRForgeFlow", "ChrisOForgeFlow"], "development_status": "Production/Stable", "website": "https://github.com/OCA/server-tools", "category": "Tools", diff --git a/base_cron_exclusion/models/ir_cron.py b/base_cron_exclusion/models/ir_cron.py index a88482723..814dc19b7 100644 --- a/base_cron_exclusion/models/ir_cron.py +++ b/base_cron_exclusion/models/ir_cron.py @@ -1,9 +1,9 @@ -# Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com) +# Copyright 2017-21 ForgeFlow S.L. (https://www.forgeflow.com) # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). import logging -from odoo import _, api, fields, models, sql_db +from odoo import _, api, fields, models from odoo.exceptions import ValidationError _logger = logging.getLogger(__name__) @@ -61,11 +61,10 @@ class IrCron(models.Model): return lock_cr @classmethod - def _process_job(cls, job_cr, job, cron_cr): - db = sql_db.db_connect(cls.pool._db.dbname) + def _process_job(cls, db, cron_cr, job): locked_crons = cls._lock_mutually_exclusive_cron(db, job["id"]) try: - res = super(IrCron, cls)._process_job(job_cr, job, cron_cr) + res = super(IrCron, cls)._process_job(db, cron_cr, job) finally: locked_crons.close() _logger.debug("released blocks for cron job %s" % job["cron_name"]) diff --git a/base_cron_exclusion/readme/CONTRIBUTORS.rst b/base_cron_exclusion/readme/CONTRIBUTORS.rst index 8b8d63050..e5863fb0f 100644 --- a/base_cron_exclusion/readme/CONTRIBUTORS.rst +++ b/base_cron_exclusion/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ +* Christopher Ormaza * Lois Rilo * Jordi Ballester * Bhavesh Odedra