Olivier Dony 9427804ef4 [FIX] ir.cron: execute jobs in priority order (again)
The selection mechanism selects 1 job at a time from the jobs that are
ready to execute, but while doing this it should respect the `priority`
defined on the jobs. Otherwise the field is useless, and the user has no
way to ensure that a long-running job does not cause starvation.
(Assuming execution resources that are insufficient for 100% of the
processing to happen)

The `priority` ordering was apparently lost during the introduction of
the trigger mechanism in #62124 via
4b28f1162a.
It was previously taken into account in `_process_jobs()`.

The `ORDER BY` is not strictly necessary in `_get_all_ready_jobs()`, but
it seems more consistent for this method to return an ordered list as
well, given the semantics of the `priority` field. We don't know what
the caller will do with the result.

closes odoo/odoo#68411

X-original-commit: 9d570662b4016b5cd9ad3c85abbcb5428c169cc6
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-03-26 15:04:23 +00:00
…
…
…
…
…
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%