33< head >
44< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
55< meta name ="generator " content ="Docutils: https://docutils.sourceforge.io/ " />
6- < title > Job Queue </ title >
6+ < title > README.rst </ title >
77< style type ="text/css ">
88
99/*
360360</ style >
361361</ head >
362362< body >
363- < div class ="document " id ="job-queue ">
364- < h1 class ="title "> Job Queue</ h1 >
363+ < div class ="document ">
365364
365+
366+ < a class ="reference external image-reference " href ="https://odoo-community.org/get-involved?utm_source=readme ">
367+ < img alt ="Odoo Community Association " src ="https://odoo-community.org/readme-banner-image " />
368+ </ a >
369+ < div class ="section " id ="job-queue ">
370+ < h1 > Job Queue</ h1 >
366371<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372!! This file is generated by oca-gen-addon-readme !!
368373!! changes will be overwritten. !!
369374!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370- !! source digest: sha256:b92d06dbbf161572f2bf02e0c6a59282cea11cc5e903378094bead986f0125de
375+ !! source digest: sha256:6846860017b2a564dba3eb31b31d701c7c08c9f2bda739e3e0c3a03e07ef22f9
371376!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372- < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Mature " src ="https://img.shields.io/badge/maturity-Mature-brightgreen.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/licence-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/queue/tree/16.0/queue_job "> < img alt ="OCA/queue " src ="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=16.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
377+ < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Mature " src ="https://img.shields.io/badge/maturity-Mature-brightgreen.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/license-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/queue/tree/16.0/queue_job "> < img alt ="OCA/queue " src ="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=16.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
373378< p > This addon adds an integrated Job Queue to Odoo.</ p >
374379< p > It allows to postpone method calls executed asynchronously.</ p >
375380< p > Jobs are executed in the background by a < tt class ="docutils literal "> Jobrunner</ tt > , in their own transaction.</ p >
@@ -441,11 +446,11 @@ <h1 class="title">Job Queue</h1>
441446</ ul >
442447</ div >
443448< div class ="section " id ="installation ">
444- < h1 > < a class ="toc-backref " href ="#toc-entry-1 "> Installation</ a > </ h1 >
449+ < h2 > < a class ="toc-backref " href ="#toc-entry-1 "> Installation</ a > </ h2 >
445450< p > Be sure to have the < tt class ="docutils literal "> requests</ tt > library.</ p >
446451</ div >
447452< div class ="section " id ="configuration ">
448- < h1 > < a class ="toc-backref " href ="#toc-entry-2 "> Configuration</ a > </ h1 >
453+ < h2 > < a class ="toc-backref " href ="#toc-entry-2 "> Configuration</ a > </ h2 >
449454< ul class ="simple ">
450455< li > Using environment variables and command line:< ul >
451456< li > Adjust environment variables (optional):< ul >
@@ -501,15 +506,15 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
501506</ ul >
502507</ div >
503508< div class ="section " id ="usage ">
504- < h1 > < a class ="toc-backref " href ="#toc-entry-3 "> Usage</ a > </ h1 >
509+ < h2 > < a class ="toc-backref " href ="#toc-entry-3 "> Usage</ a > </ h2 >
505510< p > To use this module, you need to:</ p >
506511< ol class ="arabic simple ">
507512< li > Go to < tt class ="docutils literal "> Job Queue</ tt > menu</ li >
508513</ ol >
509514< div class ="section " id ="developers ">
510- < h2 > < a class ="toc-backref " href ="#toc-entry-4 "> Developers</ a > </ h2 >
515+ < h3 > < a class ="toc-backref " href ="#toc-entry-4 "> Developers</ a > </ h3 >
511516< div class ="section " id ="delaying-jobs ">
512- < h3 > < a class ="toc-backref " href ="#toc-entry-5 "> Delaying jobs</ a > </ h3 >
517+ < h4 > < a class ="toc-backref " href ="#toc-entry-5 "> Delaying jobs</ a > </ h4 >
513518< p > The fast way to enqueue a job for a method is to use < tt class ="docutils literal "> with_delay()</ tt > on a record
514519or model:</ p >
515520< pre class ="code python literal-block ">
@@ -621,7 +626,7 @@ <h3><a class="toc-backref" href="#toc-entry-5">Delaying jobs</a></h3>
621626</ pre >
622627</ div >
623628< div class ="section " id ="enqueing-job-options ">
624- < h3 > < a class ="toc-backref " href ="#toc-entry-6 "> Enqueing Job Options</ a > </ h3 >
629+ < h4 > < a class ="toc-backref " href ="#toc-entry-6 "> Enqueing Job Options</ a > </ h4 >
625630< ul class ="simple ">
626631< li > priority: default is 10, the closest it is to 0, the faster it will be
627632executed</ li >
@@ -638,7 +643,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Enqueing Job Options</a></h3>
638643</ ul >
639644</ div >
640645< div class ="section " id ="configure-default-options-for-jobs ">
641- < h3 > < a class ="toc-backref " href ="#toc-entry-7 "> Configure default options for jobs</ a > </ h3 >
646+ < h4 > < a class ="toc-backref " href ="#toc-entry-7 "> Configure default options for jobs</ a > </ h4 >
642647< p > In earlier versions, jobs could be configured using the < tt class ="docutils literal "> @job</ tt > decorator.
643648This is now obsolete, they can be configured using optional < tt class ="docutils literal "> queue.job.function</ tt >
644649and < tt class ="docutils literal "> queue.job.channel</ tt > XML records.</ p >
@@ -759,7 +764,7 @@ <h3><a class="toc-backref" href="#toc-entry-7">Configure default options for job
759764without delaying any jobs.</ p >
760765</ div >
761766< div class ="section " id ="testing ">
762- < h3 > < a class ="toc-backref " href ="#toc-entry-8 "> Testing</ a > </ h3 >
767+ < h4 > < a class ="toc-backref " href ="#toc-entry-8 "> Testing</ a > </ h4 >
763768< p > < strong > Asserting enqueued jobs</ strong > </ p >
764769< p > The recommended way to test jobs, rather than running them directly and synchronously is to
765770split the tests in two parts:</ p >
@@ -879,14 +884,14 @@ <h3><a class="toc-backref" href="#toc-entry-8">Testing</a></h3>
879884</ div >
880885</ div >
881886< div class ="section " id ="tips-and-tricks ">
882- < h3 > < a class ="toc-backref " href ="#toc-entry-9 "> Tips and tricks</ a > </ h3 >
887+ < h4 > < a class ="toc-backref " href ="#toc-entry-9 "> Tips and tricks</ a > </ h4 >
883888< ul class ="simple ">
884889< li > < strong > Idempotency</ strong > (< a class ="reference external " href ="https://www.restapitutorial.com/lessons/idempotency.html "> https://www.restapitutorial.com/lessons/idempotency.html</ a > ): The queue_job should be idempotent so they can be retried several times without impact on the data.</ li >
885890< li > < strong > The job should test at the very beginning its relevance</ strong > : the moment the job will be executed is unknown by design. So the first task of a job should be to check if the related work is still relevant at the moment of the execution.</ li >
886891</ ul >
887892</ div >
888893< div class ="section " id ="patterns ">
889- < h3 > < a class ="toc-backref " href ="#toc-entry-10 "> Patterns</ a > </ h3 >
894+ < h4 > < a class ="toc-backref " href ="#toc-entry-10 "> Patterns</ a > </ h4 >
890895< p > Through the time, two main patterns emerged:</ p >
891896< ol class ="arabic simple ">
892897< li > For data exposed to users, a model should store the data and the model should be the creator of the job. The job is kept hidden from the users</ li >
@@ -896,7 +901,7 @@ <h3><a class="toc-backref" href="#toc-entry-10">Patterns</a></h3>
896901</ div >
897902</ div >
898903< div class ="section " id ="known-issues-roadmap ">
899- < h1 > < a class ="toc-backref " href ="#toc-entry-11 "> Known issues / Roadmap</ a > </ h1 >
904+ < h2 > < a class ="toc-backref " href ="#toc-entry-11 "> Known issues / Roadmap</ a > </ h2 >
900905< ul class ="simple ">
901906< li > After creating a new database or installing < tt class ="docutils literal "> queue_job</ tt > on an
902907existing database, Odoo must be restarted for the runner to detect it.</ li >
@@ -917,7 +922,7 @@ <h1><a class="toc-backref" href="#toc-entry-11">Known issues / Roadmap</a></h1>
917922</ pre >
918923</ div >
919924< div class ="section " id ="changelog ">
920- < h1 > < a class ="toc-backref " href ="#toc-entry-12 "> Changelog</ a > </ h1 >
925+ < h2 > < a class ="toc-backref " href ="#toc-entry-12 "> Changelog</ a > </ h2 >
921926<!-- [ The change log. The goal of this file is to help readers
922927understand changes between version. The primary audience is
923928end users and integrators. Purely technical changes such as
@@ -928,7 +933,7 @@ <h1><a class="toc-backref" href="#toc-entry-12">Changelog</a></h1>
928933forbidden and will likely break the structure of the README.rst
929934or other documents where this fragment is included. ] -->
930935< div class ="section " id ="next ">
931- < h2 > < a class ="toc-backref " href ="#toc-entry-13 "> Next</ a > </ h2 >
936+ < h3 > < a class ="toc-backref " href ="#toc-entry-13 "> Next</ a > </ h3 >
932937< ul class ="simple ">
933938< li > [ADD] Run jobrunner as a worker process instead of a thread in the main
934939process (when running with –workers > 0)</ li >
@@ -939,24 +944,24 @@ <h2><a class="toc-backref" href="#toc-entry-13">Next</a></h2>
939944</ div >
940945</ div >
941946< div class ="section " id ="bug-tracker ">
942- < h1 > < a class ="toc-backref " href ="#toc-entry-14 "> Bug Tracker</ a > </ h1 >
947+ < h2 > < a class ="toc-backref " href ="#toc-entry-14 "> Bug Tracker</ a > </ h2 >
943948< p > Bugs are tracked on < a class ="reference external " href ="https://github.com/OCA/queue/issues "> GitHub Issues</ a > .
944949In case of trouble, please check there if your issue has already been reported.
945950If you spotted it first, help us to smash it by providing a detailed and welcomed
946951< a class ="reference external " href ="https://github.com/OCA/queue/issues/new?body=module:%20queue_job%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** "> feedback</ a > .</ p >
947952< p > Do not contact contributors directly about support or help with technical issues.</ p >
948953</ div >
949954< div class ="section " id ="credits ">
950- < h1 > < a class ="toc-backref " href ="#toc-entry-15 "> Credits</ a > </ h1 >
955+ < h2 > < a class ="toc-backref " href ="#toc-entry-15 "> Credits</ a > </ h2 >
951956< div class ="section " id ="authors ">
952- < h2 > < a class ="toc-backref " href ="#toc-entry-16 "> Authors</ a > </ h2 >
957+ < h3 > < a class ="toc-backref " href ="#toc-entry-16 "> Authors</ a > </ h3 >
953958< ul class ="simple ">
954959< li > Camptocamp</ li >
955960< li > ACSONE SA/NV</ li >
956961</ ul >
957962</ div >
958963< div class ="section " id ="contributors ">
959- < h2 > < a class ="toc-backref " href ="#toc-entry-17 "> Contributors</ a > </ h2 >
964+ < h3 > < a class ="toc-backref " href ="#toc-entry-17 "> Contributors</ a > </ h3 >
960965< ul class ="simple ">
961966< li > Guewen Baconnier << a class ="reference external " href ="mailto:guewen.baconnier@camptocamp.com "> guewen.baconnier@camptocamp.com</ a > ></ li >
962967< li > Stéphane Bidoul << a class ="reference external " href ="mailto:stephane.bidoul@acsone.eu "> stephane.bidoul@acsone.eu</ a > ></ li >
@@ -973,7 +978,7 @@ <h2><a class="toc-backref" href="#toc-entry-17">Contributors</a></h2>
973978</ ul >
974979</ div >
975980< div class ="section " id ="maintainers ">
976- < h2 > < a class ="toc-backref " href ="#toc-entry-18 "> Maintainers</ a > </ h2 >
981+ < h3 > < a class ="toc-backref " href ="#toc-entry-18 "> Maintainers</ a > </ h3 >
977982< p > This module is maintained by the OCA.</ p >
978983< a class ="reference external image-reference " href ="https://odoo-community.org ">
979984< img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " />
@@ -988,5 +993,6 @@ <h2><a class="toc-backref" href="#toc-entry-18">Maintainers</a></h2>
988993</ div >
989994</ div >
990995</ div >
996+ </ div >
991997</ body >
992998</ html >
0 commit comments