repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | /** |
| #2 | * Shared utilities for gateway operations |
| #3 | */ |
| #4 | |
| #5 | /** |
| #6 | * Wait for a sandbox process to complete |
| #7 | * |
| #8 | * @param proc - Process object with status property |
| #9 | * @param timeoutMs - Maximum time to wait in milliseconds |
| #10 | * @param pollIntervalMs - How often to check status (default 500ms) |
| #11 | */ |
| #12 | export async function waitForProcess( |
| #13 | proc: { status: string }, |
| #14 | timeoutMs: number, |
| #15 | pollIntervalMs: number = 500 |
| #16 | ): Promise<void> { |
| #17 | const maxAttempts = Math.ceil(timeoutMs / pollIntervalMs); |
| #18 | let attempts = 0; |
| #19 | while (proc.status === 'running' && attempts < maxAttempts) { |
| #20 | await new Promise(r => setTimeout(r, pollIntervalMs)); |
| #21 | attempts++; |
| #22 | } |
| #23 | } |
| #24 |