(&self, session_id: &str)
| 217 | } |
| 218 | |
| 219 | pub fn is_busy(&self, session_id: &str) -> bool { |
| 220 | matches!( |
| 221 | self.get(session_id), |
| 222 | RunStatus::Busy | RunStatus::Retrying { .. } |
| 223 | ) |
| 224 | } |
| 225 | |
| 226 | pub fn assert_not_busy(&self, session_id: &str) -> Result<(), BusyError> { |
| 227 | if self.is_busy(session_id) { |