open-webui/backend/open_webui
Lin Junrong 211906d799
fix: keep references to lifespan background tasks (#28053)
periodic_usage_pool_cleanup, periodic_session_pool_cleanup and
scheduler_worker_loop were started with asyncio.create_task and their
handles discarded. The event loop keeps only a weak reference to a task,
so a task with no other referent can be garbage collected while it is
suspended at an await. All three are while True loops meant to run for
the process lifetime, and if one is collected the failure is silent:
pool entries stop being cleaned up, or automations and calendar alerts
stop firing, with nothing logged.

Six lines above, redis_task_command_listener is already stored on
app.state and cancelled on shutdown. This applies the same treatment to
the other three.

Closes #28052
2026-08-17 01:18:22 -06:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal perf: route native JSON columns through JSONCodec instead of stdlib json (#28396) 2026-08-10 19:39:49 -05:00
migrations refac 2026-08-10 23:22:08 -06:00
models fix: re-syncing an existing model no longer fails silently (#28036) 2026-08-17 01:14:11 -06:00
retrieval refac: issue Playwright web loader requests from the shared HTTP clients (#28634) 2026-08-17 01:06:12 -06:00
routers fix: persist the Open Sharing permission in default user permissions (#27609) 2026-08-17 01:03:07 -06:00
socket refac 2026-08-14 00:22:17 -06:00
static refac 2026-07-27 19:39:36 -04:00
storage refac 2026-07-31 17:41:14 -04:00
tools fix: preserve complete user context in agentic retrieval (#27642) 2026-08-17 00:56:48 -06:00
utils refac 2026-08-17 00:16:07 -07:00
__init__.py refac 2026-07-27 19:39:36 -04:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-08-13 19:59:11 -06:00
constants.py fix: reject COUNT rules without DTSTART so limited automations cannot run forever (#27781) 2026-08-12 01:08:55 -06:00
env.py fix: make the aiodns resolver opt-in and pin aiodns to 3.6.1 (#28242) 2026-08-10 19:52:29 -06:00
events.py refac 2026-08-16 23:21:00 -07:00
functions.py perf: build debug log messages lazily so disabled debug logs cost nothing (#27834) 2026-07-31 19:09:01 -05:00
main.py fix: keep references to lifespan background tasks (#28053) 2026-08-17 01:18:22 -06:00
tasks.py refac 2026-08-14 00:22:17 -06:00