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