Check if a session is busy (busy or retrying).
(&self, session_id: &str)
| 135 | |
| 136 | /// Check if a session is busy (busy or retrying). |
| 137 | pub async fn is_busy(&self, session_id: &str) -> bool { |
| 138 | let state = self.state.read().await; |
| 139 | matches!( |
| 140 | state.get(session_id), |
| 141 | Some(SessionStatusInfo::Busy | SessionStatusInfo::Retry { .. }) |
| 142 | ) |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | impl Default for SessionStatusManager { |