External Job
This is a module for Odoo to run external programs.
It is meant to be used in one of this way:
- run button on the job definition (but it can only be used by a member of the admin group)
- run_job method launched programmatically, it can be in the code, by the scheduler, or a queued task (see queue module)
In the case of a command line job, the definition indicates a program to launch with his expected arguments. The arguments will be obtained by formatting a dictionary (see the job definition view for the details).
In the case of extrunner job, the definition will indicate environment variables to send along the program call.
A job log is the result of a call to the job definition. It is either in process if the job has been started, done or in an error state.
Autovacuum
Old job log can be deleted by setting the unlink delay on the job definition. Only done job are considered for the unlink. The default is to do no autovacuum.
The autovacuum is only done once by day by default, change it as necessary if more frequent unlink is necessary.
Usage
In production, ODOO_ADDONS_EXTERNAL_JOB_TIMEOUT should be set. It is used as a timeout for request to extrunner job calls.