(&self, run_id: &str)
| 192 | } |
| 193 | |
| 194 | pub async fn mark_cancelled(&self, run_id: &str) -> Option<RunSnapshot> { |
| 195 | let mut runs = self.runs.write().await; |
| 196 | let run = runs.get_mut(run_id)?; |
| 197 | run.status = RunStatus::Cancelled; |
| 198 | run.updated_at_ms = now_ms(); |
| 199 | Some(run.clone()) |
| 200 | } |
| 201 | |
| 202 | pub async fn snapshot(&self, run_id: &str) -> Option<RunSnapshot> { |
| 203 | self.runs.read().await.get(run_id).cloned() |