Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.14.2
_commit: v1.19.2
_src_path: git+https://github.com/OCA/oca-addons-repo-template
ci: GitHub
dependency_installation_mode: PIP
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
Expand All @@ -11,6 +11,7 @@ github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
include_wkhtmltopdf: false
odoo_test_flavor: OCB
odoo_version: 12.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
Expand All @@ -28,6 +29,4 @@ repo_description: 'Asynchronous Job Queue. Delay Model methods in asynchronous j
repo_name: Odoo Queue Modules
repo_slug: queue
repo_website: https://github.com/OCA/queue
travis_apt_packages: []
travis_apt_sources: []

11 changes: 10 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.6"
Expand All @@ -27,6 +27,15 @@ jobs:
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
Expand All @@ -36,10 +36,10 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
makepot: "true"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
name: test with OCB
makepot: "true"
services:
postgres:
image: postgres:9.6
Expand All @@ -50,7 +50,7 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand Down
1 change: 1 addition & 0 deletions queue_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ def enqueue_waiting(self):
AND state = %s;
"""
self.env.cr.execute(sql, (PENDING, self.uuid, DONE, WAIT_DEPENDENCIES))
self.env["queue.job"].invalidate_cache(["state"])

def store(self):
"""Store the Job"""
Expand Down
3 changes: 2 additions & 1 deletion queue_job/models/queue_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class QueueJob(models.Model):
index=True)
priority = fields.Integer()
exc_name = fields.Char(string="Exception", readonly=True)
exc_message = fields.Char(string="Exception Message", readonly=True)
exc_message = fields.Char(string="Exception Message", readonly=True,
track_visibility='onchange')
exc_info = fields.Text(string='Exception Info', readonly=True)
result = fields.Text(readonly=True)

Expand Down
2 changes: 2 additions & 0 deletions queue_job/tests/test_delayable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import mock
import unittest

# pylint: disable=odoo-addons-relative-import
# we are testing, we want to test as we were an external consumer of the API
from odoo.addons.queue_job.delay import Delayable, DelayableGraph


Expand Down