mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #12958] [MERGED] fix: use run_in_threadpool for search_web to prevent blocking #38692
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12958
Author: @Youggls
Created: 4/17/2025
Status: ✅ Merged
Merged: 4/18/2025
Merged by: @tjbck
Base:
dev← Head:fix_search_web📝 Commits (1)
9669cd3fix: use run_in_threadpool for search_web to prevent blocking📊 Changes
1 file changed (+5 additions, -2 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+5 -2)📄 Description
Used fastapi's run_in_threadpool function to execute the search_web function, preventing the synchronous function from blocking the entire web search process.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
run_in_threadpoolfunction for non-blocking executionDeprecated
Removed
Fixed
search_webfunction was blocking the entire web search processSecurity
Breaking Changes
Additional Information
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.