Wait for a sandbox to become ready.
Polls getSandboxStatus() until the sandbox reaches "ready" or "failed" status, then returns the full Sandbox object.
waitForSandbox(name: string, options: WaitForSandboxOptions = {}): Promise<Sandbox>| Name | Type | Description |
|---|---|---|
name* | string | Sandbox name. |
options | WaitForSandboxOptions | Default: {}Polling options (timeout, pollInterval). |
const sandbox = await client.createSandbox("python-sandbox", { waitForReady: false });
// ... do other work ...
const readySandbox = await client.waitForSandbox(sandbox.name);