Queue Job Cron Jobrunner

Run jobs without a dedicated JobRunner

Technical Name:
queue_job_cron_jobrunner
License:
Author:
Camptocamp SA
https://odoo-community.org/web/image/product.template/10623/image_1920?unique=73e9a3c
  • Odoo Version

Terms and Conditions 

Queue Job Cron Jobrunner

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 be run, like on Odoo.sh.

Unlike the regular job runner, where jobs are dispatched to the HttpWorkers, jobs are processed on the CronWorker threads by the job runner crons. This is a design decision because:

  • Odoo.sh puts HttpWorkers to sleep when there's no network activity
  • HttpWorkers are meant for traffic. Users shouldn't pay the price of background tasks.

For now, it only implements the most basic features of the queue_job runner, notably no channel capacity nor priorities. Please check the ROADMAP for further details.

Important

This is an alpha version, the data model and design can change at any time without warning. Only for development or testing purpose, do not use in production. More details on development status

Table of contents

Configuration

Warning

Don't use this module if you're already running the regular queue_job runner.

For the easiest case, no configuration is required besides installing the module.

To avoid CronWorker CPU timeout from abruptly stopping the job processing cron, it's recommended to launch Odoo with --limit-time-real-cron=0, to disable the CronWorker timeout altogether.

Note

In Odoo.sh, this is done by default.

Parallel execution of jobs can be achieved by leveraging multiple ir.cron records:

  • Make sure you have enough CronWorkers available (Odoo CLI --max-cron-threads)
  • Duplicate the queue_job_cron cron record as many times as needed, until you have as much records as cron workers.

Known issues / Roadmap

  • Support channel capacity and priority. (See _acquire_one_job)
  • Gracefully handle CronWorker CPU timeouts. (See _job_runner)
  • Commit transaction after job state updated to started. (See _process)

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.

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

Credits

Authors

  • Camptocamp SA

Maintainers

This module is maintained by the OCA.

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.

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

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products