mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
fix(appd): broadcast AppState::Stopped on READY timeout
runtime.rs: the READY-timeout early-return path now broadcasts AppState::Stopped before returning so WebSocket clients see the session disappear when a module fails to signal readiness within 30s.
This commit is contained in:
parent
3315b158db
commit
d6de84b4c7
1 changed files with 6 additions and 4 deletions
|
|
@ -55,10 +55,12 @@ pub(crate) async fn supervise(
|
||||||
Err(_elapsed) => {
|
Err(_elapsed) => {
|
||||||
tracing::warn!(session_id, %app_id, "READY timeout after 30s; killing process");
|
tracing::warn!(session_id, %app_id, "READY timeout after 30s; killing process");
|
||||||
let _ = child.kill().await;
|
let _ = child.kill().await;
|
||||||
registry
|
let mut reg = registry.lock().await;
|
||||||
.lock()
|
reg.set_state(session_id, AppStateKind::Stopped);
|
||||||
.await
|
let _ = reg.broadcast().send(Response::AppState {
|
||||||
.set_state(session_id, AppStateKind::Stopped);
|
session_id,
|
||||||
|
state: AppStateKind::Stopped,
|
||||||
|
});
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue