fix: avoid unwrap in MCP health check to pass clippy
Some checks failed
CI / Check (pull_request) Failing after 2m52s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Some checks failed
CI / Check (pull_request) Failing after 2m52s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -158,12 +158,17 @@ pub async fn refresh_mcp_status() -> Result<(), ServerFnError> {
|
|||||||
_ => McpServerStatus::Stopped,
|
_ => McpServerStatus::Stopped,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let status_bson = match bson::to_bson(&new_status) {
|
||||||
|
Ok(b) => b,
|
||||||
|
Err(_) => continue,
|
||||||
|
};
|
||||||
|
|
||||||
let _ = state
|
let _ = state
|
||||||
.db
|
.db
|
||||||
.mcp_servers()
|
.mcp_servers()
|
||||||
.update_one(
|
.update_one(
|
||||||
doc! { "_id": oid },
|
doc! { "_id": oid },
|
||||||
doc! { "$set": { "status": bson::to_bson(&new_status).unwrap(), "updated_at": Utc::now().to_rfc3339() } },
|
doc! { "$set": { "status": status_bson, "updated_at": Utc::now().to_rfc3339() } },
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user