This Odoo addon introduces a comprehensive Job Queue system, enabling deferred execution of method calls in an asynchronous manner. With this feature, users can manage and execute tasks efficiently, enhancing the overall performance and scalability of their Odoo applications.
This addon adds an integrated Job Queue to Odoo. It allows to postpone method calls executed asynchronously. Jobs are executed in the background by a Jobrunner, in their own transaction.
Example:
from odoo import models, fields, api
class MyModel(models.Model):
_name = 'my.model'
def my_method(self, a, k=None):
_logger.info('executed with a: %s and k: %s', a, k)
class MyOtherModel(models.Model):
_name = 'my.other.model'
def button_do_stuff(self):
self.env['my.model'].with_delay().my_method('a', k=2)
In the snippet of code above, when we call button_do_stuff, a job capturing the method and arguments will be postponed. It will be executed as soon as the Jobrunner has a free bucket, which can be instantaneous if no other job is running.
Implement user interface views for managing and monitoring jobs, allowing users to view job details, statuses, and perform actions related to jobs.
component responsible for executing jobs efficiently, leveraging PostgreSQL's NOTIFY feature to handle job execution and notifications
[options]
(...)
workers = 6
server_wide_modules = web,queue_job
(...)
[queue_job]
channels = root:2