From 067207fc1ee914e4ca6d861d894eda139612adb9 Mon Sep 17 00:00:00 2001 From: Ivan Kropotkin Date: Sat, 11 May 2024 20:57:00 +0200 Subject: [PATCH] :rainbow: rename context key WARNING devel odoo.addons.queue_job.utils: `test_queue_job_no_delay` ctx key found. NO JOB scheduled. Note that this key is deprecated: please use `queue_job__no_delay` --- sync/models/sync_task.py | 2 +- sync/tests/test_trigger_db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/models/sync_task.py b/sync/models/sync_task.py index 6be3e04c..09306441 100644 --- a/sync/models/sync_task.py +++ b/sync/models/sync_task.py @@ -125,7 +125,7 @@ def start( queue_job_or_result = run( job, trigger._sync_handler, args, raise_on_error=raise_on_error ) - if with_delay and not self.env.context.get("test_queue_job_no_delay"): + if with_delay and not self.env.context.get("queue_job__no_delay"): job.queue_job_id = queue_job_or_result.db_record() return job else: diff --git a/sync/tests/test_trigger_db.py b/sync/tests/test_trigger_db.py index fcea7f23..ae45379e 100644 --- a/sync/tests/test_trigger_db.py +++ b/sync/tests/test_trigger_db.py @@ -17,7 +17,7 @@ def setUp(self): self.env = self.env( context=dict( self.env.context, - test_queue_job_no_delay=True, # no jobs thanks + queue_job__no_delay=True, # no jobs thanks ) ) funcs = self.env["sync.link"]._get_eval_context()