Skip to content

Commit

Permalink
Merge pull request #434 from OCA/14.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/queue (14.0)
  • Loading branch information
bt-admin authored Jan 29, 2025
2 parents b83dfcf + 81f6262 commit 72a5321
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[base_export_async](base_export_async/) | 14.0.1.0.0 | | Asynchronous export with job queue
[base_export_async](base_export_async/) | 14.0.1.0.1 | | Asynchronous export with job queue
[base_import_async](base_import_async/) | 14.0.1.0.2 | | Import CSV files in the background
[export_async_schedule](export_async_schedule/) | 14.0.1.0.1 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Generate and send exports by emails on a schedule
[queue_job](queue_job/) | 14.0.3.9.1 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job](queue_job/) | 14.0.3.9.2 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job_batch](queue_job_batch/) | 14.0.1.0.2 | | Job Queue Batch
[queue_job_context](queue_job_context/) | 14.0.1.0.1 | [![AshishHirapara](https://github.com/AshishHirapara.png?size=30px)](https://github.com/AshishHirapara) | Queue Job, prepare context before enqueue keys
[queue_job_cron](queue_job_cron/) | 14.0.2.0.0 | | Scheduled Actions as Queue Jobs
[queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 14.0.1.0.3 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Run jobs without a dedicated JobRunner
[queue_job_subscribe](queue_job_subscribe/) | 14.0.1.0.0 | | Control which users are subscribed to queue job notifications
[queue_job_subscribe](queue_job_subscribe/) | 14.0.1.0.1 | | Control which users are subscribed to queue job notifications
[test_base_import_async](test_base_import_async/) | 14.0.1.0.1 | | Test suite for base_import_async. Normally you don't need to install this.
[test_queue_job](test_queue_job/) | 14.0.3.4.0 | | Queue Job Tests
[test_queue_job](test_queue_job/) | 14.0.3.4.1 | | Queue Job Tests
[test_queue_job_batch](test_queue_job_batch/) | 14.0.1.0.0 | | Test Job Queue Batch

[//]: # (end addons)
Expand Down
2 changes: 1 addition & 1 deletion base_export_async/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base Export Async
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e3e8c7e07bf30eeee570423b5cae7488f38e5b5453dc284b61c2713cf4c96ac6
!! source digest: sha256:cf5f439114cb36f87f48b4aa85cac693381fb78cab92a68f371a98460ca7a38b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion base_export_async/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Base Export Async",
"summary": "Asynchronous export with job queue",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"license": "AGPL-3",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
Expand Down
14 changes: 8 additions & 6 deletions base_export_async/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Base Export Async</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e3e8c7e07bf30eeee570423b5cae7488f38e5b5453dc284b61c2713cf4c96ac6
!! source digest: sha256:cf5f439114cb36f87f48b4aa85cac693381fb78cab92a68f371a98460ca7a38b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/queue/tree/14.0/base_export_async"><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-14-0/queue-14-0-base_export_async"><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&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Standard Export can be delayed in asynchronous jobs executed in the background and then send by email to the user.</p>
Expand Down Expand Up @@ -418,7 +418,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<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>
<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>
Expand Down
2 changes: 1 addition & 1 deletion base_export_async/tests/test_base_export_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

class TestBaseExportAsync(common.TransactionCase):
def setUp(self):
super(TestBaseExportAsync, self).setUp()
super().setUp()
self.delay_export_obj = self.env["delay.export"]
self.job_obj = self.env["queue.job"]
_request_stack.push(
Expand Down
2 changes: 1 addition & 1 deletion queue_job/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Job Queue
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5ad5d33dbc6873d731aa277b1e53152643175aba30ae399f5b5ee7c64958efa4
!! source digest: sha256:7548ac634e7444ca933ea5410b86f4c5edef0496361b60dc5232a6a327b74ff0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
Expand Down
2 changes: 1 addition & 1 deletion queue_job/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "Job Queue",
"version": "14.0.3.9.1",
"version": "14.0.3.9.2",
"author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"license": "LGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion queue_job/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def _execute_direct(self):
self._generated_job.perform()


class DelayableRecordset(object):
class DelayableRecordset:
"""Allow to delay a method for a recordset (shortcut way)
Usage::
Expand Down
2 changes: 1 addition & 1 deletion queue_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def identity_exact_hasher(job_):


@total_ordering
class Job(object):
class Job:
"""A Job is a task to execute. It is the in-memory representation of a job.
Jobs are stored in the ``queue.job`` Odoo Model, but they are handled
Expand Down
10 changes: 5 additions & 5 deletions queue_job/jobrunner/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
_logger = logging.getLogger(__name__)


class PriorityQueue(object):
class PriorityQueue:
"""A priority queue that supports removing arbitrary objects.
Adding an object already in the queue is a no op.
Expand Down Expand Up @@ -103,7 +103,7 @@ def pop(self):


@total_ordering
class ChannelJob(object):
class ChannelJob:
"""A channel job is attached to a channel and holds the properties of a
job that are necessary to prioritise them.
Expand Down Expand Up @@ -205,7 +205,7 @@ def __lt__(self, other):
return self.sorting_key() < other.sorting_key()


class ChannelQueue(object):
class ChannelQueue:
"""A channel queue is a priority queue for jobs.
Jobs with an eta are set aside until their eta is past due, at
Expand Down Expand Up @@ -334,7 +334,7 @@ def get_wakeup_time(self, wakeup_time=0):
return wakeup_time


class Channel(object):
class Channel:
"""A channel for jobs, with a maximum capacity.
When jobs are created by queue_job modules, they may be associated
Expand Down Expand Up @@ -581,7 +581,7 @@ def split_strip(s, sep, maxsplit=-1):
return [x.strip() for x in s.split(sep, maxsplit)]


class ChannelManager(object):
class ChannelManager:
"""High level interface for channels
This class handles:
Expand Down
4 changes: 2 additions & 2 deletions queue_job/jobrunner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def urlopen():
thread.start()


class Database(object):
class Database:
def __init__(self, db_name):
self.db_name = db_name
connection_info = _connection_info_for(db_name)
Expand Down Expand Up @@ -344,7 +344,7 @@ def set_job_enqueued(self, uuid):
)


class QueueJobRunner(object):
class QueueJobRunner:
def __init__(
self,
scheme="http",
Expand Down
2 changes: 1 addition & 1 deletion queue_job/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Job Queue</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5ad5d33dbc6873d731aa277b1e53152643175aba30ae399f5b5ee7c64958efa4
!! source digest: sha256:7548ac634e7444ca933ea5410b86f4c5edef0496361b60dc5232a6a327b74ff0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/14.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-14-0/queue-14-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&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon adds an integrated Job Queue to Odoo.</p>
Expand Down
2 changes: 1 addition & 1 deletion queue_job/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def __init__(

def setUp(self):
"""Log an extra statement which test is started."""
super(OdooDocTestCase, self).setUp()
super().setUp()
logging.getLogger(__name__).info("Running tests for %s", self._dt_test.name)


Expand Down
2 changes: 1 addition & 1 deletion queue_job_subscribe/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Queue Job Subscribe",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"author": "Acsone SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"summary": "Control which users are subscribed to queue job notifications",
Expand Down
2 changes: 1 addition & 1 deletion queue_job_subscribe/tests/test_job_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TestJobSubscribe(common.TransactionCase):
def setUp(self):
super(TestJobSubscribe, self).setUp()
super().setUp()
grp_queue_job_manager = self.ref("queue_job.group_queue_job_manager")
self.other_partner_a = self.env["res.partner"].create(
{"name": "My Company a", "is_company": True, "email": "[email protected]"}
Expand Down
2 changes: 1 addition & 1 deletion test_queue_job/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Queue Job Tests",
"version": "14.0.3.4.0",
"version": "14.0.3.4.1",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "LGPL-3",
"category": "Generic Modules",
Expand Down
2 changes: 1 addition & 1 deletion test_queue_job/models/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def job_with_retry_pattern__no_zero(self):
return

def mapped(self, func):
return super(ModelTestQueueJob, self).mapped(func)
return super().mapped(func)

def job_alter_mutable(self, mutable_arg, mutable_kwarg=None):
mutable_arg.append(2)
Expand Down
4 changes: 2 additions & 2 deletions test_queue_job/tests/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_infinite_retryable_error(self):
self.assertEqual(test_job.retry, 1)

def test_on_instance_method(self):
class A(object):
class A:
def method(self):
pass

Expand Down Expand Up @@ -651,7 +651,7 @@ class TestJobStorageMultiCompany(common.TransactionCase):
"""Test storage of jobs"""

def setUp(self):
super(TestJobStorageMultiCompany, self).setUp()
super().setUp()
self.queue_job = self.env["queue.job"]
grp_queue_job_manager = self.ref("queue_job.group_queue_job_manager")
User = self.env["res.users"]
Expand Down
2 changes: 1 addition & 1 deletion test_queue_job/tests/test_job_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TestJobChannels(common.TransactionCase):
def setUp(self):
super(TestJobChannels, self).setUp()
super().setUp()
self.function_model = self.env["queue.job.function"]
self.channel_model = self.env["queue.job.channel"]
self.test_model = self.env["test.queue.channel"]
Expand Down
2 changes: 1 addition & 1 deletion test_queue_job/tests/test_job_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestJobFunction(common.TransactionCase):
def setUp(self):
super(TestJobFunction, self).setUp()
super().setUp()
self.test_function_model = self.env.ref(
"queue_job.job_function_queue_job__test_job"
)
Expand Down

0 comments on commit 72a5321

Please sign in to comment.