Search 1.9 billion lines of Odoo code on GitHub

queue_job_batch

Author: Creu Blanca,Odoo Community Association (OCA)
License: AGPL-3
Branch: 936_14.0_oca
Repository: Digital5-Odoo/queue
Dependencies: queue_job, and web
Languages: HTML (377, 27.4%), JavaScript (144, 10.5%), PO File (146, 10.6%), Python (157, 11.4%), SVG (125, 9.1%), Sass (37, 2.7%), XML (325, 23.7%), and reStructuredText (63, 4.6%)
Other branches: 000_12.0_oca, 046_14.0_oca, 071_11.0_oca, 073_12.0_oca, 084_12.0_oca, 090_12.0_oca, 096_12.0_oca, 096_14.0_oca, 099_11.0_oca, 101_14.0_oca, 102_11.0_oca, 105_11.0_oca, 106_11.0_oca, 11.0, 111_11.0_oca, 113_12.0_oca, 118_12.0_oca, 12.0, 121_12.0_oca, 122_12.0_oca, 124_12.0_oca, 127_12.0_oca, 129_12.0_oca, 130_12.0_oca, 132_12.0_oca, 133_12.0_oca, 134_14.0_oca, 136_12.0_oca, 139_14.0_oca, 143_14.0_oca, 151_14.0_oca, 152_14.0_oca, 161_14.0_oca, 162_14.0_oca, 164_14.0_oca, 166_14.0_oca, 167_14.0_oca, 168_14.0_oca, 169_14.0_oca, 176_14.0_oca, 177_14.0_oca, 178_14.0_oca, 179_14.0_oca, 180_14.0_oca, 938_14.0_oca, TSG_mrp_d5_14.0_oca, base_12.0_oca, and base_14.0_oca
Other repositories: 001101/queue, 2FM/queue, Alfa-90/queue, Callino/queue, Change2improve/queue, ChinaShrimp/queue, Comunitea/queue, DamonLiu0814/queue, ERPLibre/queue, ForgeFlow/queue, Gabinete-Digital/queue, Ingeos/queue, Jarsa/queue, Leuan12/queue, MathBenTech/queue, MediaJockey/queue, MjAbuz/queue, NeatNerdPrime/queue, Numigi/queue, OCA-MUK/queue, OCA/queue, OpenAT/queue, RRRoger/queue, RSC-TECHNOLOGY-CI/queue, SanteLibre/queue, SequarSrl/queue, Syci-Consulting/queue, TRESCLOUD/queue, Tatider/queue, Tecnativa/queue, VCLS-org/queue, Vauxoo/queue, acsone/queue, akretion/queue, alsor62/queue, altanmur/queue, anggadjava/queue, anhvu-sg/queue, aurestic/queue, blueoceandevops/queue, bobslee/queue, boskowski/odoo_oca_queue, brain-tec/queue, camptocamp/queue, celm1990/queue, cogitoweb/queue, coopiteasy/queue, csveda/queue, diggy128/queue, dndoanh/queue, dong-z/queue, druidoo-dev/queue, dynapps/queue, ecosoft-odoo/queue, ehsu0407/queue, em230418/queue, etobella/queue, exosoftware/oca-queue, factorlibre/queue, glovebx/queue, guewen/queue, guwenfeng/queue, hibou-io/oca-queue, hinfo506/queue, hpatelserpentcs/queue, hq8399/queue, hzwzw/queue, ilyasbahridudak/queue, lideritjnma/queue, lincersolucoes/oca-queue, liweijie0812/queue, loftwah/queue, mauraco-group/queue, nadiaafa/queue, nilshamerlinck/queue, phatdo-novobi/queue, praxigento/oca-queue, profumang/queue, raizs/queue, rlfss/queue, royalline1/queue, sahil-navadiya/queue, sanube/queue, sewisoft/queue, shengyf1/queue, sotsam/queue, steingabelgaard/queue, sunflowerit/queue, sunshineLhj/queue, tajawal/queue, takinobori/oca-queue, tegin/queue, telesoho/queue, thanhchatvn/queue, themreza/queue, tirma-sa/queue, unitek-solusi/OCA-queue, ursais/queue, versada/queue, vnsofthe/queue, vrenaville/queue, wjshan/queue, wty0512/queue, x0rzkov/odoo-queue, xcgd/queue, xwh123807/queue, yucer/queue, and zakiuu/queue

<h1 class="title">Job Queue Batch</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/queue/tree/14.0/queue_job_batch"><img alt="OCA/queue" src="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-queue_job_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/230/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This addon adds an a grouper for queue jobs.</p> <p>It allows to show your jobs in a batched form in order to know better the results.</p> <p>Example:</p> <pre> <code lang="python">from odoo import models, fields, api from odoo.addons.queue_job.job import job class MyModel(models.Model): _name = 'my.model' &#64;api.multi &#64;job 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' &#64;api.multi def button_do_stuff(self): batch = self.env['queue.job.batch'].get_new_batch('Group') for i in range(1, 100): self.env['my.model'].with_context( job_batch=batch ).with_delay().my_method('a', k=i) batch.enqueue()</code> </pre> <p>In the snippet of code above, when we call <code>button_do_stuff</code>, 100 jobs 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.</p> <p>Once all the jobs have finished, the grouper will be marked as finished.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#usage" id="id1">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id4">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li> <li><a class="reference internal" href="#other-credits" id="id6">Other credits</a></li> <li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h2><a class="toc-backref" href="#id1">Usage</a></h2> <p>You can manage your batch jobs from the Systray. A new button will be shown with your currently executing job batches and the recently finished job groups.</p> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/queue/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/queue/issues/new?body=module:%20queue_job_batch%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id3">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id4">Authors</a></h3> <ul class="simple"> <li>Creu Blanca</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id5">Contributors</a></h3> <ul class="simple"> <li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li> <li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li> <li><dl class="first docutils"> <dt><a class="reference external" href="https://trobz.com">Trobz</a>:</dt> <dd><ul class="first last"> <li>Hoang Diep &lt;<a class="reference external" href="mailto:hoang&#64;trobz.com">hoang&#64;trobz.com</a>&gt;</li> </ul> </dd> </dl> </li> </ul> <a name="other-credits"></a> <h3><a class="toc-backref" href="#id6">Other credits</a></h3> <p>The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp</p> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id7">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/queue/tree/14.0/queue_job_batch">OCA/queue</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>