8/8/2023 0 Comments Queue job![]() Tip: to enable debug logging for the queue job, use INFO.queue_: database connections readyĬreate jobs (eg using base_import_async) and observe they INFO.queue_: queue job runner ready for db INFO.queue_: initializing database connections (.) workers = 6 server_wide_modules = web,queue_job (.) channels = root:2Ĭonfirm the runner is starting correctly by checking the odoo log file: If xmlrpc_port is not set: ODOO_QUEUE_JOB_PORT=8069 ODOO_QUEUE_JOB_CHANNELS=root:4 or any other channels configuration. Using environment variables and command line: Related Actions: link an action on the job view, such as open the recordīe sure to have the requests library. ![]() Job properties: priorities, estimated time of arrival (ETA), custom Retry Pattern: the 3 first tries, retry after 10 seconds, the 5 next tries, ![]() Retries: Ability to retry jobs by raising a type of exception Allow for instance to restrict heavy jobs to beĮxecuted one at a time while little ones are executed 4 at a times. Jobrunner: execute the jobs, highly efficient thanks to PostgreSQL’s NOTIFYĬhannels: give a capacity for the root channel and its sub-channels and Views for jobs, jobs are stored in PostgreSQL Jobrunner has a free bucket, which can be instantaneous if no other job is The method and arguments will be postponed. In the snippet of code above, when we call button_do_stuff, a job capturing Model ): _name = 'my.other.model' def button_do_stuff ( self ): self. info ( 'executed with a: %s and k: %s ', a, k ) class MyOtherModel ( models. Model ): _name = 'my.model' def my_method ( self, a, k = None ): _logger. Jobs are executed in the background by a Jobrunner, in their own transaction.Įxample: from odoo import models, fields, api class MyModel ( models. It allows to postpone method calls executed asynchronously. See the article Robost queue job handling in Craft for more information.This addon adds an integrated Job Queue to Odoo. Make sure you're service supervisor gives the queue runner a low priority so it doesn't interfere with site requests. This is a bit troubling because the queue should never be able to take down the site. ![]() I have found on quicker intervals that the queue can get overwhelmed with jobs quicker than it is able to complete them eventually taking the site down as a whole. In this case, craft\controllers\QueueController contains all the endpoints / actions used by the Queue Manager utility and will show you how Craft uses the service methods to build the interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |