feat: Pos処理の非同期化・Busy状態の削除

This commit is contained in:
2026-05-04 15:52:27 +09:00
parent 5b38aa6a87
commit 954cf200e2
15 changed files with 537 additions and 256 deletions
+3 -7
View File
@@ -440,10 +440,6 @@ pub enum PodStatus {
Idle,
Running,
Paused,
/// The worker turn has ended, but the controller is still performing
/// post-run jobs (memory extract / consolidate / compact) and cannot
/// accept a new turn immediately.
Busy,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
@@ -763,18 +759,18 @@ mod tests {
#[test]
fn event_status_format() {
let event = Event::Status {
status: PodStatus::Busy,
status: PodStatus::Running,
};
let json = serde_json::to_string(&event).unwrap();
let parsed: serde_json::Value = serde_json::from_str(&json).unwrap();
assert_eq!(parsed["event"], "status");
assert_eq!(parsed["data"]["status"], "busy");
assert_eq!(parsed["data"]["status"], "running");
let decoded: Event = serde_json::from_str(&json).unwrap();
assert!(matches!(
decoded,
Event::Status {
status: PodStatus::Busy
status: PodStatus::Running
}
));
}