Skip to content

Commit

Permalink
Merge branch '17.0' of https://github.com/OCA/queue into 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Maralai committed May 7, 2024
2 parents dc7e661 + b9a8a10 commit d4c2f27
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.19
_commit: v1.21.1
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
run: oca_init_test_database
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ exclude: |
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# Ignore test files in addons
/tests/samples/.*|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
Expand All @@ -41,7 +43,7 @@ repos:
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down Expand Up @@ -110,7 +112,7 @@ repos:
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/OCA/pylint-odoo
rev: v8.0.19
rev: v9.0.4
hooks:
- id: pylint_odoo
name: pylint with optional checks
Expand Down
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fix = true
extend-select = [
"B",
"C90",
"E501", # line too long (default 88)
"I", # isort
"UP", # pyupgrade
]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[queue_job](queue_job/) | 17.0.1.0.1 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job](queue_job/) | 17.0.1.0.2 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job_cron](queue_job_cron/) | 17.0.1.0.0 | | Scheduled Actions as Queue Jobs
[queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 17.0.1.0.0 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Run jobs without a dedicated JobRunner
[queue_job_subscribe](queue_job_subscribe/) | 17.0.1.0.0 | | Control which users are subscribed to queue job notifications
[test_queue_job](test_queue_job/) | 17.0.1.0.0 | | Queue Job Tests
[test_queue_job](test_queue_job/) | 17.0.1.0.1 | | Queue Job Tests

[//]: # (end addons)

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:58e189fe2cad642dc9523fc9283f41a4c110ec12f216a4d4e70babce7ffee13e
!! source digest: sha256:d0febcfe31d0d48afbdc26c7ddc7af80382fe628d4168d86d68bbf151f885358
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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": "17.0.1.0.1",
"version": "17.0.1.0.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/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Job Queue</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:58e189fe2cad642dc9523fc9283f41a4c110ec12f216a4d4e70babce7ffee13e
!! source digest: sha256:d0febcfe31d0d48afbdc26c7ddc7af80382fe628d4168d86d68bbf151f885358
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/17.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-17-0/queue-17-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=17.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
6 changes: 3 additions & 3 deletions queue_job/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def trap_jobs(self):


@contextmanager
def mock_with_delay():
def mock_with_delay(): # pylint: disable=E501
"""Context Manager mocking ``with_delay()``
DEPRECATED: use ``trap_jobs()'``.
Expand Down Expand Up @@ -390,9 +390,9 @@ def test_export(self):
self.assertDictEqual(delay_kwargs, {})
An example of the first kind of test:
https://github.com/camptocamp/connector-jira/blob/0ca4261b3920d5e8c2ae4bb0fc352ea3f6e9d2cd/connector_jira/tests/test_batch_timestamp_import.py#L43-L76 # noqa
https://github.com/camptocamp/connector-jira/blob/0ca4261b3920d5e8c2ae4bb0fc352ea3f6e9d2cd/connector_jira/tests/test_batch_timestamp_import.py#L43-L76
And the second kind:
https://github.com/camptocamp/connector-jira/blob/0ca4261b3920d5e8c2ae4bb0fc352ea3f6e9d2cd/connector_jira/tests/test_import_task.py#L34-L46 # noqa
https://github.com/camptocamp/connector-jira/blob/0ca4261b3920d5e8c2ae4bb0fc352ea3f6e9d2cd/connector_jira/tests/test_import_task.py#L34-L46
"""
with mock.patch(
Expand Down
2 changes: 1 addition & 1 deletion queue_job/tests/test_model_job_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_channel_complete_name_uniq(self):

# The context manager 'with self.assertRaises(IntegrityError)' purposefully
# not uses here due to its 'flush_all()' method inside it and exception raises
# before the line 'self.env.flush_all()'. So, we are expecting an IntegrityError.
# before the line 'self.env.flush_all()'. So, we are expecting an IntegrityError
try:
self.env.flush_all()
except IntegrityError as ex:
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": "17.0.1.0.0",
"version": "17.0.1.0.1",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "LGPL-3",
"category": "Generic Modules",
Expand Down
13 changes: 7 additions & 6 deletions test_queue_job/tests/test_delay_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ def test_trap_jobs_on_with_delay_assert_model_enqueued_mismatch(self):
"identity_key=<function identity_exact at 0x[0-9a-fA-F]+>, "
"max_retries=1, priority=15\\) was not enqueued\\.\n"
"Actual enqueued jobs:\n"
r" \* <test.queue.job\({record_id},\)>.testing_method\(1, foo=2\) with properties "
r"\(priority=15, max_retries=1, eta=15, description=Test, channel=root.test, "
r" \* <test.queue.job\({record_id},\)>.testing_method\(1, foo=2\) with "
r"properties \(priority=15, max_retries=1, eta=15, description=Test, "
r"channel=root.test, "
r"identity_key=<function identity_exact at 0x[0-9a-fA-F]+>\)"
).format(record_id=recordset.id)
with self.assertRaisesRegex(AssertionError, message):
Expand All @@ -168,14 +169,14 @@ def test_trap_jobs_on_with_delay_assert_recordset_enqueued_mismatch(self):
self.env["test.queue.job"].button_that_uses_with_delay()
trap.assert_jobs_count(1)
message = (
rf"Job <test\.queue.job\({recordset.id},\)>\.testing_method\(1, foo=2\) with "
r"properties \(channel=root\.test, description=Test, eta=15, "
rf"Job <test\.queue.job\({recordset.id},\)>\.testing_method\(1, foo=2\)"
r" with properties \(channel=root\.test, description=Test, eta=15, "
"identity_key=<function identity_exact at 0x[0-9a-fA-F]+>, "
"max_retries=1, priority=15\\) was not enqueued\\.\n"
"Actual enqueued jobs:\n"
r" \* <test.queue.job\(\)>.testing_method\(1, foo=2\) with properties "
r"\(priority=15, max_retries=1, eta=15, description=Test, channel=root.test, "
r"identity_key=<function identity_exact at 0x[0-9a-fA-F]+>\)"
r"\(priority=15, max_retries=1, eta=15, description=Test, channel=root."
r"test, identity_key=<function identity_exact at 0x[0-9a-fA-F]+>\)"
)
with self.assertRaisesRegex(AssertionError, message):
trap.assert_enqueued_job(
Expand Down
2 changes: 1 addition & 1 deletion test_queue_job/tests/test_json_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class TestJsonField(common.TransactionCase):
# TODO: when migrating to 16.0, adapt the checks in queue_job/tests/test_json_field.py
# TODO: when migrating to 16.0, adapt checks in queue_job/tests/test_json_field.py
# to verify the context keys are encoded and remove these
def test_encoder_recordset_store_context(self):
demo_user = self.env.ref("base.user_demo")
Expand Down

0 comments on commit d4c2f27

Please sign in to comment.