MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / apply_deleted_locked

Method apply_deleted_locked

crates/openshell-server/src/compute/mod.rs:1352–1371  ·  view source on GitHub ↗
(&self, sandbox_id: &str)

Source from the content-addressed store, hash-verified

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;

Callers 2

apply_deletedMethod · 0.80
prune_missing_sandboxMethod · 0.80

Calls 5

remove_sandboxMethod · 0.80
notifyMethod · 0.80
cleanup_sandbox_stateMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected