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

Method wait_deleted

python/openshell/sandbox.py:445–458  ·  view source on GitHub ↗
(self, sandbox_name: str, *, timeout_seconds: float = 60.0)

Source from the content-addressed store, hash-verified

443 return bool(response.deleted)
444
445 def wait_deleted(self, sandbox_name: str, *, timeout_seconds: float = 60.0) -> None:
446 deadline = time.time() + timeout_seconds
447 while time.time() < deadline:
448 try:
449 self.get(sandbox_name)
450 except grpc.RpcError as exc:
451 if (
452 isinstance(exc, grpc.Call)
453 and exc.code() == grpc.StatusCode.NOT_FOUND
454 ):
455 return
456 raise
457 time.sleep(1)
458 raise SandboxError(f"sandbox {sandbox_name} was not deleted within timeout")
459
460 def wait_ready(
461 self, sandbox_name: str, *, timeout_seconds: float = 300.0

Callers 1

__exit__Method · 0.80

Calls 3

getMethod · 0.95
SandboxErrorClass · 0.85
codeMethod · 0.80

Tested by

no test coverage detected