mirror of
https://github.com/open-webui/mcpo.git
synced 2026-07-23 20:25:21 -04:00
[PR #194] [MERGED] enh: Allow for startup if some MCPs unavailable, graceful shutdown and better subtask handling #190
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/mcpo/pull/194
Author: @taylorwilsdon
Created: 7/12/2025
Status: ✅ Merged
Merged: 7/16/2025
Merged by: @tjbck
Base:
dev← Head:smooth_starting📝 Commits (10+)
101c513Gracefully shutdown uvicorn.Server on task cancellation in run()663f731Merge pull request #162 from 021gink/graceful-uvicorn-shutdown4758d30Merge pull request #140 from open-webui/dev1986204Merge pull request #175 from open-webui/dev0b56c45now correctly handles failed startups, but slowly70aec45concurrent startup3392f9epin timeout reasonable05b3eb3filter out httpinfo5f42e1dcleanup, sse timeout revert, uvicorn hang fix, docs links when prefix not empty9360e1erestore connection timeout to 10s📊 Changes
4 files changed (+197 additions, -106 deletions)
View changed files
📝
src/mcpo/main.py(+184 -89)📝
src/mcpo/tests/test_main.py(+3 -3)📝
src/mcpo/utils/auth.py(+9 -13)📝
uv.lock(+1 -1)📄 Description
@tjbck this closes:
https://github.com/open-webui/mcpo/issues/193
and several others
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
GracefulShutdownclass to handleSIGINTandSIGTERMsignals, ensuring all server tasks are properly cancelled and awaited.asyncio.gatherin the main applifespanfor faster launch times.app.state.is_connected) for sub-applications to reliably determine connectivity.Changed
lifespanlogic was significantly refactored to support concurrent startup and provide clearer connection status reporting.runfunction now integrates theGracefulShutdownhandler to manage the server lifecycle.mcpopackage version from0.0.14to0.0.16inuv.lock.Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.