From e2809b83c001a21ff7f20ee1f8f30c347ae14cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Tue, 22 Sep 2026 13:45:50 +0800 Subject: [PATCH] =?UTF-8?q?3D=20=E5=86=92=E7=83=9F=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E5=8D=95=E7=AB=AF=E7=82=B9=E5=A4=B1=E8=B4=A5=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E4=B8=AD=E6=96=AD=E5=85=B6=E4=BD=99=E7=AB=AF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - wait_for_task / get_task / download_model 失败时记录该端点错误并继续 - 保留 throw_on_failure: false 的原有语义,仅补齐传输与超时类错误 --- .../examples/tripo_generation_smoke.rs | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/server-rs/crates/platform-tripo/examples/tripo_generation_smoke.rs b/server-rs/crates/platform-tripo/examples/tripo_generation_smoke.rs index d36e5e3e1..03e9a6ab6 100644 --- a/server-rs/crates/platform-tripo/examples/tripo_generation_smoke.rs +++ b/server-rs/crates/platform-tripo/examples/tripo_generation_smoke.rs @@ -138,7 +138,10 @@ async fn main() -> Result<(), Box> { ] { // The SDK poller is used only by this smoke example. It is not part // of the platform-tripo public API. - sdk_client + // + // 每个端点单独报错并继续:这个示例的目的是一次跑完三个端点, + // 某个端点超时 / 传输失败不应把剩下的端点一起跳过。 + if let Err(error) = sdk_client .wait_for_task( &handle.task_id, WaitOptions { @@ -149,9 +152,19 @@ async fn main() -> Result<(), Box> { ..WaitOptions::default() }, ) - .await?; + .await + { + eprintln!("{name} skipped: wait failed: {error}"); + continue; + } - let snapshot = client.get_task(&handle).await?; + let snapshot = match client.get_task(&handle).await { + Ok(snapshot) => snapshot, + Err(error) => { + eprintln!("{name} skipped: task lookup failed: {error}"); + continue; + } + }; println!( "{name} status={:?} progress={:?} output={:?}", snapshot.status, snapshot.progress, snapshot.output @@ -165,7 +178,13 @@ async fn main() -> Result<(), Box> { continue; } - let downloaded = client.download_model(&snapshot).await?; + let downloaded = match client.download_model(&snapshot).await { + Ok(downloaded) => downloaded, + Err(error) => { + eprintln!("{name} skipped: artifact download failed: {error}"); + continue; + } + }; let filename = downloaded.filename(name); let mut file = File::create(&filename).await?; let mut bytes = 0u64;