Skip to content

Commit

Permalink
Merge pull request #412 from OCA/18.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/queue (18.0)
  • Loading branch information
bt-admin authored Oct 19, 2024
2 parents aa69238 + c0b9369 commit b348af8
Show file tree
Hide file tree
Showing 27 changed files with 1,064 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[queue_job](queue_job/) | 18.0.1.0.0 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job_cron](queue_job_cron/) | 18.0.1.0.0 | | Scheduled Actions as Queue Jobs
[test_queue_job](test_queue_job/) | 18.0.1.0.0 | | Queue Job Tests

[//]: # (end addons)
Expand Down
108 changes: 108 additions & 0 deletions queue_job_cron/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
===============================
Scheduled Actions as Queue Jobs
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e594f92f3f64913a677efe2ec1a6873402737045411b1f83ff3a672377cbc7cb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github
:target: https://github.com/OCA/queue/tree/18.0/queue_job_cron
:alt: OCA/queue
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-queue_job_cron
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of queue_job and allows to run an
Odoo cron as a queue job.

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

1. Just install it.

Usage
=====

To use this module, you need to:

#. Go to a scheduled action, a flag "Run as queue job" will allow you to
run the action as a queue job. You will also allowed to select a channel
of its execution. To configure dedicated channels please refers to
queue_job help:
https://github.com/OCA/queue/blob/12.0/queue_job/README.rst

Channels can be used to manage sequential jobs and prevent concurrency
accesses. To do that you just have to define a channel per cron limited
to 1 at time.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/queue/issues/new?body=module:%20queue_job_cron%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ACSONE SA/NV

Contributors
------------

- Cédric Pigeon <[email protected]>
- Nguyen Minh Chien <[email protected]>
- Tran Quoc duong <[email protected]>
- Vo Hong Thien <[email protected]>

Other credits
-------------

The migration of this module from 17.0 to 18.0 was financially supported
by Camptocamp.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/18.0/queue_job_cron>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions queue_job_cron/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions queue_job_cron/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2019 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

{
"name": "Scheduled Actions as Queue Jobs",
"version": "18.0.1.0.0",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"license": "AGPL-3",
"category": "Generic Modules",
"depends": ["queue_job"],
"data": ["data/data.xml", "views/ir_cron_view.xml"],
"installable": True,
}
12 changes: 12 additions & 0 deletions queue_job_cron/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="queue.job.channel" id="channel_root_ir_cron">
<field name="name">ir_cron</field>
<field name="parent_id" ref="queue_job.channel_root" />
</record>
<record model="queue.job.function" id="job_function_ir_cron_run_job_as_queue_job">
<field name="model_id" ref="base.model_ir_cron" />
<field name="method">_compute_run_as_queue_job</field>
<field name="channel_id" ref="channel_root_ir_cron" />
</record>
</odoo>
52 changes: 52 additions & 0 deletions queue_job_cron/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_cron
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-07-12 14:43+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid ""
"Avoid parallel run. If the cron job is already running, the new one will be "
"skipped. By default, odoo never runs the same cron job in parallel. This "
"option is therefore set to True by default when job is run as a queue job."
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
msgid "Channel"
msgstr "Kanal"

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid "No Parallel Queue Job Run"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Run As Queue Job"
msgstr "als Warteschlangen-Job ausführen"

#. module: queue_job_cron
#: model:ir.model,name:queue_job_cron.model_ir_cron
msgid "Scheduled Actions"
msgstr "Eingeplante Aktionen"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Specify if this cron should be ran as a queue job"
msgstr ""
"Bitte spezifizieren, ob der Cron-Job als Warteschlangen-Job ausgeführt "
"werden soll."
52 changes: 52 additions & 0 deletions queue_job_cron/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_cron
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-03 13:40+0000\n"
"Last-Translator: kikopeiro <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid ""
"Avoid parallel run. If the cron job is already running, the new one will be "
"skipped. By default, odoo never runs the same cron job in parallel. This "
"option is therefore set to True by default when job is run as a queue job."
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
msgid "Channel"
msgstr "Canal"

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid "No Parallel Queue Job Run"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Run As Queue Job"
msgstr "Ejecutar como trabajo en cola"

#. module: queue_job_cron
#: model:ir.model,name:queue_job_cron.model_ir_cron
msgid "Scheduled Actions"
msgstr "Acciones planificadas"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Specify if this cron should be ran as a queue job"
msgstr ""
"Especifica si esta acción planificada deberá ser ejecutada como un trabajo "
"en cola"
50 changes: 50 additions & 0 deletions queue_job_cron/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_cron
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-05 00:26+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid ""
"Avoid parallel run. If the cron job is already running, the new one will be "
"skipped. By default, odoo never runs the same cron job in parallel. This "
"option is therefore set to True by default when job is run as a queue job."
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
msgid "Channel"
msgstr "Canale"

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid "No Parallel Queue Job Run"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Run As Queue Job"
msgstr "Eseguire come lavoro in coda"

#. module: queue_job_cron
#: model:ir.model,name:queue_job_cron.model_ir_cron
msgid "Scheduled Actions"
msgstr "Azioni pianificate"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Specify if this cron should be ran as a queue job"
msgstr "Indica se questo cron deve essere eseguito come un lavoro in coda"
47 changes: 47 additions & 0 deletions queue_job_cron/i18n/queue_job_cron.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_cron
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid ""
"Avoid parallel run. If the cron job is already running, the new one will be "
"skipped. By default, odoo never runs the same cron job in parallel. This "
"option is therefore set to True by default when job is run as a queue job."
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
msgid "Channel"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__no_parallel_queue_job_run
msgid "No Parallel Queue Job Run"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Run As Queue Job"
msgstr ""

#. module: queue_job_cron
#: model:ir.model,name:queue_job_cron.model_ir_cron
msgid "Scheduled Actions"
msgstr ""

#. module: queue_job_cron
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
msgid "Specify if this cron should be ran as a queue job"
msgstr ""
Loading

0 comments on commit b348af8

Please sign in to comment.