feat: harden demo flows and observability

This commit is contained in:
a.tolmachev
2026-03-25 21:31:54 +03:00
parent 1a6d7c5ddc
commit 2d3abb9f3d
7 changed files with 320 additions and 13 deletions
+8
View File
@@ -6,6 +6,7 @@ use std::{
use mcpaas_registry::{PostgresRegistry, RegistryError, RegistryOperation};
use tokio::sync::RwLock;
use tracing::info;
#[derive(Clone)]
pub struct PublishedToolCatalog {
@@ -66,11 +67,18 @@ impl PublishedToolCatalog {
.map(|operation| (operation.name.clone(), operation))
.collect::<HashMap<_, _>>();
let mut guard = self.cached.write().await;
let previous_count = guard.tools.len();
guard.loaded_at = Some(Instant::now());
guard.tools = tools;
guard.tools_by_name = tools_by_name;
info!(
published_tool_count = guard.tools.len(),
previous_published_tool_count = previous_count,
"published tool catalog refreshed"
);
Ok(())
}
}