From 53d64677d095afa4dde6f37243a54206f4b0e78a Mon Sep 17 00:00:00 2001 From: Accusys Date: Fri, 15 May 2026 01:22:54 +0800 Subject: [PATCH] fix: rsync pipeline check looks for source-built binary at ~/bin/rsync --- src/api/server.rs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/api/server.rs b/src/api/server.rs index 8257924..ab27640 100644 --- a/src/api/server.rs +++ b/src/api/server.rs @@ -591,7 +591,7 @@ async fn health_detailed(State(state): State) -> Json ServiceStatus { } } +async fn check_rsync() -> ServiceStatus { + let start = Instant::now(); + let paths = [ + std::path::Path::new("/Users/accusys/bin/rsync"), + std::path::Path::new("/opt/homebrew/bin/rsync"), + ]; + for p in &paths { + if p.exists() { + return ServiceStatus { + status: "ok".to_string(), + latency_ms: Some(start.elapsed().as_millis() as u64), + error: None, + }; + } + } + ServiceStatus { + status: "error".to_string(), + latency_ms: Some(start.elapsed().as_millis() as u64), + error: Some("rsync not found (built from source expected at ~/bin/rsync)".to_string()), + } +} + async fn check_binary(name: &str) -> ServiceStatus { let start = Instant::now(); match std::process::Command::new("which").arg(name).output() {