(&self, run_id: &str)
| 204 | } |
| 205 | |
| 206 | pub async fn events(&self, run_id: &str) -> Vec<RunEventRecord> { |
| 207 | self.events |
| 208 | .read() |
| 209 | .await |
| 210 | .get(run_id) |
| 211 | .cloned() |
| 212 | .unwrap_or_default() |
| 213 | } |
| 214 | |
| 215 | pub async fn list(&self) -> Vec<RunSnapshot> { |
| 216 | let mut runs = self.runs.read().await.values().cloned().collect::<Vec<_>>(); |