mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-29 01:41:47 +00:00
Address PR review findings on the original shim: 1. Source-shape gating (avoid shadowing future upstream fixes) The install now inspects the original implementation source and only patches when it actually references `self._connection.stop` — the buggy pattern this shim exists to fix. If a newer SQLAlchemy ships a working `_terminate_force_close` we leave it alone. 2. Wake the aiosqlite worker, don't just flag it In aiosqlite ≥0.20 the worker thread blocks on `_tx.get()`. Setting `_running = False` alone never unblocks it — the queue needs a sentinel push for the loop to observe the flag. The replacement now puts `(None, None)` onto `_tx` first and then flips `_running`, so the worker exits promptly instead of relying on a subsequent unrelated queue item or GC. 3. Conditional install (no global mutation on non-sqlite deployments) Move `_install_aiosqlite_compat()` inside the `if 'sqlite' in ASYNC_SQLALCHEMY_DATABASE_URL` branch in `internal/db.py`, so PostgreSQL / MySQL / etc. deployments get no SQLAlchemy monkey-patch at all. https://claude.ai/code/session_01JSr4NZSskEUQvoJnavVXh8 |
||
|---|---|---|
| .. | ||
| data | ||
| open_webui | ||
| .dockerignore | ||
| .gitignore | ||
| dev.sh | ||
| requirements-min.txt | ||
| requirements.txt | ||
| start.sh | ||
| start_windows.bat | ||