mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-04 02:33:43 +00:00
Remove redis task command listener from main.py
Removed redis_task_command_listener from app state initialization and cleanup.
This commit is contained in:
parent
4f37f96591
commit
a0c162328a
1 changed files with 0 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue