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

Method reserve_pending_sandbox

crates/openshell-driver-docker/src/lib.rs:1051–1073  ·  view source on GitHub ↗
(&self, sandbox: &DriverSandbox)

Source from the content-addressed store, hash-verified

1049 }
1050
1051 async fn reserve_pending_sandbox(&self, sandbox: &DriverSandbox) -> Result<(), Status> {
1052 let mut pending = self.pending.lock().await;
1053 if pending
1054 .values()
1055 .any(|record| record.sandbox.id == sandbox.id || record.sandbox.name == sandbox.name)
1056 {
1057 return Err(Status::already_exists("sandbox already exists"));
1058 }
1059
1060 pending.insert(
1061 sandbox.id.clone(),
1062 PendingSandboxRecord {
1063 sandbox: pending_sandbox_snapshot(
1064 sandbox,
1065 &self.config.sandbox_namespace,
1066 provisioning_condition(),
1067 false,
1068 ),
1069 task: None,
1070 },
1071 );
1072 Ok(())
1073 }
1074
1075 async fn pending_snapshot(
1076 &self,

Callers 1

create_sandbox_innerMethod · 0.80

Calls 2

pending_sandbox_snapshotFunction · 0.85
provisioning_conditionFunction · 0.70

Tested by

no test coverage detected