Mountain/IPC/StatusReporter/
mountain_attempt_recovery.rs1
2use tauri::Manager;
6
7use crate::{IPC::StatusReporter::Reporter::Struct as Reporter, dev_log};
8
9#[tauri::command]
10pub async fn mountain_attempt_recovery(app_handle:tauri::AppHandle) -> Result<(), String> {
11 dev_log!("lifecycle", "Tauri command: attempt_recovery");
12
13 if let Some(reporter) = app_handle.try_state::<Reporter>() {
14 reporter.attempt_recovery().await
15 } else {
16 Err("StatusReporter not found in application state".to_string())
17 }
18}