From ee6f1414ae2a10f8183d051ac7d2b1a3c8779bca Mon Sep 17 00:00:00 2001 From: GuillemCForgeFlow Date: Tue, 6 Oct 2026 14:14:35 +0200 Subject: [PATCH] [FIX] queue_job: don't start the jobrunner in odoo shell odoo shell starts the server with stop=True and stops it right away, so the runner thread was started for nothing and its START_DELAY made every shell wait 5 seconds before the prompt. Core already skips its HTTP and cron threads when stop is set; the runner now follows the same rule. --- queue_job/jobrunner/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/queue_job/jobrunner/__init__.py b/queue_job/jobrunner/__init__.py index e2561b0e74..2f42bf3276 100644 --- a/queue_job/jobrunner/__init__.py +++ b/queue_job/jobrunner/__init__.py @@ -141,7 +141,8 @@ def prefork_worker_pop(server, pid): def threaded_start(server, *args, **kwargs): res = orig_threaded_start(server, *args, **kwargs) - _start_runner_thread("threaded server") + if not kwargs.get("stop"): + _start_runner_thread("threaded server") return res