Skip to content

Commit

Permalink
[REF] align with branch 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
florentx committed Dec 27, 2024
1 parent c754edb commit bb95bca
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion queue_job/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
17 changes: 8 additions & 9 deletions queue_job/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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 (

Check warning on line 658 in queue_job/delay.py

View check run for this annotation

Codecov / codecov/patch

queue_job/delay.py#L658

Added line #L658 was not covered by tests
f"DelayableRecordset({self.delayable.recordset._name}"
f"{getattr(self.delayable.recordset, '_ids', '')})"
)

__repr__ = __str__
2 changes: 1 addition & 1 deletion queue_job/readme/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
2 changes: 1 addition & 1 deletion queue_job_cron/views/ir_cron_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bb95bca

Please sign in to comment.