(&self, sandbox_id: &str)
| 1350 | } |
| 1351 | |
| 1352 | async fn apply_deleted_locked(&self, sandbox_id: &str) -> Result<(), String> { |
| 1353 | let sandbox = self |
| 1354 | .store |
| 1355 | .get_message::<Sandbox>(sandbox_id) |
| 1356 | .await |
| 1357 | .map_err(|e| e.to_string())?; |
| 1358 | if let Some(sandbox) = sandbox.as_ref() { |
| 1359 | self.cleanup_sandbox_owned_records(sandbox).await; |
| 1360 | } |
| 1361 | |
| 1362 | let _ = self |
| 1363 | .store |
| 1364 | .delete(Sandbox::object_type(), sandbox_id) |
| 1365 | .await |
| 1366 | .map_err(|e| e.to_string())?; |
| 1367 | self.sandbox_index.remove_sandbox(sandbox_id); |
| 1368 | self.sandbox_watch_bus.notify(sandbox_id); |
| 1369 | self.cleanup_sandbox_state(sandbox_id); |
| 1370 | Ok(()) |
| 1371 | } |
| 1372 | |
| 1373 | async fn cleanup_sandbox_owned_records(&self, sandbox: &Sandbox) { |
| 1374 | self.cleanup_sandbox_ssh_sessions(sandbox.object_id()).await; |
no test coverage detected