diff --git a/queue_job/README.rst b/queue_job/README.rst index 8fe8ec405c..80713f43ca 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -434,7 +434,7 @@ running Odoo** When you are developing (ie: connector modules) you might want to bypass the queue job and run your code immediately. -To do so you can set QUEUE_JOB\__NO_DELAY=1 in your enviroment. +To do so you can set QUEUE_JOB\__NO_DELAY=1 in your environment. **Bypass jobs in tests** diff --git a/queue_job/delay.py b/queue_job/delay.py index 251e4f7a84..0ba54e48a9 100644 --- a/queue_job/delay.py +++ b/queue_job/delay.py @@ -232,7 +232,7 @@ def _ensure_same_graph_uuid(jobs): elif jobs_count == 1: if jobs[0].graph_uuid: raise ValueError( - f"Job {jobs[0]} is a single job, it should not" " have a graph uuid" + f"Job {jobs[0]} is a single job, it should not have a graph uuid" ) else: graph_uuids = {job.graph_uuid for job in jobs if job.graph_uuid} @@ -483,11 +483,10 @@ def _tail(self): return [self] def __repr__(self): - return "Delayable({}.{}({}, {}))".format( - self.recordset, - self._job_method.__name__ if self._job_method else "", - self._job_args, - self._job_kwargs, + return ( + f"Delayable({self.recordset}." + f"{self._job_method.__name__ if self._job_method else ''}" + f"({self._job_args}, {self._job_kwargs}))" ) def __del__(self): @@ -656,9 +655,9 @@ def _delay_delayable(*args, **kwargs): return _delay_delayable def __str__(self): - return "DelayableRecordset({}{})".format( - self.delayable.recordset._name, - getattr(self.delayable.recordset, "_ids", ""), + return ( + f"DelayableRecordset({self.delayable.recordset._name}" + f"{getattr(self.delayable.recordset, '_ids', '')})" ) __repr__ = __str__ diff --git a/queue_job/readme/USAGE.md b/queue_job/readme/USAGE.md index c08374b9fc..deb6fe2aca 100644 --- a/queue_job/readme/USAGE.md +++ b/queue_job/readme/USAGE.md @@ -290,7 +290,7 @@ running Odoo** When you are developing (ie: connector modules) you might want to bypass the queue job and run your code immediately. -To do so you can set QUEUE_JOB\_\_NO_DELAY=1 in your enviroment. +To do so you can set QUEUE_JOB\_\_NO_DELAY=1 in your environment. **Bypass jobs in tests** diff --git a/queue_job/static/description/index.html b/queue_job/static/description/index.html index 05893ddef0..b3dad4d055 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -8,11 +8,10 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ +:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z 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. @@ -275,7 +274,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: gray; } /* line numbers */ +pre.code .ln { color: grey; } /* 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 } @@ -301,7 +300,7 @@ span.pre { white-space: pre } -span.problematic, pre.problematic { +span.problematic { color: red } span.section-subtitle { @@ -755,7 +754,7 @@ <h3><a class="toc-backref" href="#toc-entry-7">Configure default options for job running Odoo</strong></p> <p>When you are developing (ie: connector modules) you might want to bypass the queue job and run your code immediately.</p> -<p>To do so you can set QUEUE_JOB__NO_DELAY=1 in your enviroment.</p> +<p>To do so you can set QUEUE_JOB__NO_DELAY=1 in your environment.</p> <p><strong>Bypass jobs in tests</strong></p> <p>When writing tests on job-related methods is always tricky to deal with delayed recordsets. To make your testing life easier you can set @@ -994,9 +993,7 @@ <h2><a class="toc-backref" href="#toc-entry-18">Other credits</a></h2> <div class="section" id="maintainers"> <h2><a class="toc-backref" href="#toc-entry-19">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> diff --git a/queue_job_cron/views/ir_cron_view.xml b/queue_job_cron/views/ir_cron_view.xml index 0a9a64d275..135b71402a 100644 --- a/queue_job_cron/views/ir_cron_view.xml +++ b/queue_job_cron/views/ir_cron_view.xml @@ -9,7 +9,7 @@ <field name="run_as_queue_job" /> <field name="no_parallel_queue_job_run" - invisible="run_as_queue_job == False" + invisible="not run_as_queue_job" /> <field name="channel_id"