From a0c162328ab08a748a9f8cecef937c92229348c6 Mon Sep 17 00:00:00 2001 From: Hana Halili <110349346+HANIHALILI@users.noreply.github.com> Date: Tue, 20 Jan 2026 00:12:01 +0200 Subject: [PATCH] Remove redis task command listener from main.py Removed redis_task_command_listener from app state initialization and cleanup. --- backend/open_webui/main.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 82a87e3fd9..c1f45eadcd 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -529,7 +529,6 @@ from open_webui.utils.security_headers import SecurityHeadersMiddleware from open_webui.utils.redis import get_redis_connection from open_webui.tasks import ( - redis_task_command_listener, list_task_ids_by_item_id, create_task, stop_task, @@ -613,10 +612,6 @@ async def lifespan(app: FastAPI): async_mode=True, ) - if app.state.redis is not None: - app.state.redis_task_command_listener = asyncio.create_task( - redis_task_command_listener(app) - ) if THREAD_POOL_SIZE and THREAD_POOL_SIZE > 0: limiter = anyio.to_thread.current_default_thread_limiter() @@ -647,10 +642,6 @@ async def lifespan(app: FastAPI): yield - if hasattr(app.state, "redis_task_command_listener"): - app.state.redis_task_command_listener.cancel() - - app = FastAPI( title="Open WebUI", docs_url="/docs" if ENV == "dev" else None,