mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-15 23:32:40 +00:00
Audit of asyncio.sleep vs time.sleep and event-loop-blocking calls: - utils/plugin.py: run pip `install_frontmatter_requirements` (subprocess.check_call) via asyncio.to_thread in load_tool_module_by_id, load_function_module_by_id, and install_tool_and_function_dependencies. - retrieval/utils.py: move the synchronous SSRF-guarded requests probe and loader.load() in get_content_from_url into a sync helper run via asyncio.to_thread. - routers/audio.py: write uploaded audio to disk off the event loop in transcription(). - routers/pipelines.py: write uploaded pipeline file off the event loop in upload_pipeline(). The existing time.sleep call sites are all in genuinely synchronous functions (sync requests/DB drivers/daemon threads) with async counterparts that already use asyncio.sleep, so no time.sleep -> asyncio.sleep changes were needed. Claude-Session: https://claude.ai/code/session_01LXR5bYfsfSS42RGHQZu2Ta Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| access_control | ||
| images | ||
| mcp | ||
| telemetry | ||
| actions.py | ||
| anthropic.py | ||
| asgi_middleware.py | ||
| audit.py | ||
| auth.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| context_compaction.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| memory.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| session_pool.py | ||
| task.py | ||
| tools.py | ||
| validate.py | ||
| webhook.py | ||