From 9ce6957d62d9b4f03ab11bf26e90e6e928d49018 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 2a1168707b..66575184c8 100644 --- a/queue_job/jobrunner/__init__.py +++ b/queue_job/jobrunner/__init__.py @@ -147,7 +147,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