Skip to content

Commit

Permalink
[IMP] queue_job: Don't raise warning in tests when jobs are not delayed
Browse files Browse the repository at this point in the history
  • Loading branch information
thienvh332 committed Oct 14, 2024
1 parent eb6c5dd commit 8908d1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion queue_job/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import uuid
from collections import defaultdict, deque

from odoo.tools import config

from .job import Job
from .utils import must_run_without_delay

Expand Down Expand Up @@ -492,7 +494,10 @@ def __repr__(self):

def __del__(self):
if not self._generated_job:
_logger.warning("Delayable %s was prepared but never delayed", self)
if config.get("test_enable"):
_logger.info("Delayable %s was prepared but never delayed", self)
else:
_logger.warning("Delayable %s was prepared but never delayed", self)

def _set_from_dict(self, properties):
for key, value in properties.items():
Expand Down

0 comments on commit 8908d1b

Please sign in to comment.