[router] refactor mcp to use LRU and fix pooling bug (#12346)
This commit is contained in:
@@ -782,12 +782,12 @@ pub async fn startup(config: ServerConfig) -> Result<(), Box<dyn std::error::Err
|
||||
info!("No MCP config provided, skipping MCP server initialization");
|
||||
}
|
||||
|
||||
// Start background refresh for all registered static MCP servers
|
||||
// Start background refresh for ALL MCP servers (static + dynamic in LRU cache)
|
||||
if let Some(mcp_manager) = app_context.mcp_manager.get() {
|
||||
let refresh_interval = Duration::from_secs(300); // 5 minutes, matches default TTL
|
||||
let refresh_interval = Duration::from_secs(600); // 10 minutes
|
||||
let _refresh_handle =
|
||||
Arc::clone(mcp_manager).spawn_background_refresh_all(refresh_interval);
|
||||
info!("Started background refresh for all static MCP servers");
|
||||
info!("Started background refresh for all MCP servers (every 10 minutes)");
|
||||
}
|
||||
|
||||
let worker_stats = app_context.worker_registry.stats();
|
||||
|
||||
Reference in New Issue
Block a user