Author: |
Creu Blanca,Odoo Community Association (OCA) |
License: |
AGPL-3 |
Branch: |
14.0-revert-387 |
Repository: |
acsone/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: |
12.0,
12.0-import_asyn_batch-sbj,
12.0-mig-queue_job_batch,
12.0-prg_master,
12.0-queue_job_batch-sbj,
14-queue_job_zombie,
14.0,
and
14.0-fix-delayable-repr |
Other repositories: |
001101/queue,
2FM/queue,
Alfa-90/queue,
Callino/queue,
Change2improve/queue,
ChinaShrimp/queue,
Comunitea/queue,
DamonLiu0814/queue,
Digital5-Odoo/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,
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'
@api.multi
@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'
@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 <<a class="reference external" href="mailto:etobella@creublanca.es">etobella@creublanca.es</a>></li>
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></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 <<a class="reference external" href="mailto:hoang@trobz.com">hoang@trobz.com</a>></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>