MCPcopy Create free account
hub / github.com/evilsocket/cake / update_status

Function update_status

cake-mobile/src/lib.rs:37–48  ·  view source on GitHub ↗
(stage: &str, message: &str, progress: f64)

Source from the content-addressed store, hash-verified

35static WORKER_STATUS: Mutex<String> = Mutex::new(String::new());
36
37fn update_status(stage: &str, message: &str, progress: f64) {
38 let json = format!(
39 r#"{{"stage":"{}","message":"{}","progress":{:.4}}}"#,
40 stage,
41 message.replace('\\', "\\\\").replace('"', "\\\""),
42 progress
43 );
44 log_mobile(&format!("[cake-mobile] status: {}", json));
45 if let Ok(mut s) = WORKER_STATUS.lock() {
46 *s = json;
47 }
48}
49
50fn update_serving_status(model_name: &str, layers_range: &str, backend: &str) {
51 fn esc(s: &str) -> String {

Callers 4

stop_workerFunction · 0.85
start_workerFunction · 0.85
run_zero_config_workerFunction · 0.85
run_direct_workerFunction · 0.85

Calls 1

log_mobileFunction · 0.85

Tested by

no test coverage detected