This is the API documentation for the job runner.
These classes are not intended for use by module developers.
This is an alternative to connector workers, with the goal of resolving issues due to the polling nature of workers:
It is fully compatible with the connector mechanism and only replaces workers.
/connector/runjob
HTTP request. [1]ODOO_CONNECTOR_CHANNELS=root:4
(or any other channels configuration)xmlrpc_port
is not set: ODOO_CONNECTOR_PORT=8069
channels = root:4
in the [options-connector]
section of the odoo configuration file.--load=web,web_kanban,connector
and --workers
greater than 1. [2]...INFO...connector.jobrunner.runner: starting
...INFO...connector.jobrunner.runner: initializing database connections
...INFO...connector.jobrunner.runner: connector runner ready for db <dbname>
...INFO...connector.jobrunner.runner: database connections ready
--log-handler=openerp.addons.connector:DEBUG
started
or enqueued
state after the Odoo server is halted.
Since the runner has no way to know if they are actually running or
not, and does not know for sure if it is safe to restart the jobs,
it does not attempt to restart them automatically. Such stale jobs
therefore fill the running queue and prevent other jobs to start.
You must therefore requeue them manually, either from the Jobs view,
or by running the following SQL statement before starting Odoo:update queue_job set state='pending' where state in ('started', 'enqueued')
Footnotes
[1] | From a security standpoint, it is safe to have an anonymous HTTP request because this request only accepts to run jobs that are enqueued. |
[2] | It works with the threaded Odoo server too, although this way of running Odoo is obviously not for production purposes. |