MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / stop_components

Function stop_components

src-tauri/src/lib.rs:318–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316
317#[tauri::command]
318async fn stop_components() -> Result<(), String> {
319 use std::time::Duration;
320
321 // 停止 rclone
322 if let Some(pid) = sidecar::get_sidecar_pid("rclone") {
323 println!("Stopping rclone (PID: {})", pid);
324 sidecar::kill_sidecar("rclone");
325 // 等待进程完全退出
326 tokio::time::sleep(Duration::from_millis(300)).await;
327 }
328
329 // 停止 openlist
330 if let Some(pid) = sidecar::get_sidecar_pid("openlist") {
331 println!("Stopping openlist (PID: {})", pid);
332 sidecar::kill_sidecar("openlist");
333 // 等待进程完全退出
334 tokio::time::sleep(Duration::from_millis(300)).await;
335 }
336
337 println!("All components stopped");
338 Ok(())
339}
340
341#[tauri::command]
342fn get_winfsp_install_state() -> Result<bool, usize> {

Callers

nothing calls this directly

Calls 3

get_sidecar_pidFunction · 0.85
sleepFunction · 0.85
kill_sidecarFunction · 0.70

Tested by

no test coverage detected