Skip to content

Commit

Permalink
[IMP] base: Kencove uses cron job with warning/error only
Browse files Browse the repository at this point in the history
Port from: Kencove#3
  • Loading branch information
BernatPForgeFlow authored and JordiBForgeFlow committed Jul 8, 2024
1 parent 75fff9d commit bc79f35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions odoo/addons/base/models/ir_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ def _process_jobs(cls, db_name):
job = cls._acquire_one_job(cron_cr, (job_id,))
except psycopg2.extensions.TransactionRollbackError:
cron_cr.rollback()
_logger.debug("job %s has been processed by another worker, skip", job_id)
_logger.warning("job %s has been processed by another worker, skip", job_id)
continue
if not job:
_logger.debug("another worker is processing job %s, skip", job_id)
_logger.warning("another worker is processing job %s, skip", job_id)
continue
_logger.debug("job %s acquired", job_id)
_logger.warning("job %s acquired", job_id)
# take into account overridings of _process_job() on that database
registry = odoo.registry(db_name)
registry[cls._name]._process_job(db, cron_cr, job)
cron_cr.commit()
_logger.debug("job %s updated and released", job_id)
_logger.warning("job %s updated and released", job_id)

except BadVersion:
_logger.warning('Skipping database %s as its base version is not %s.', db_name, BASE_VERSION)
Expand Down

0 comments on commit bc79f35

Please sign in to comment.