MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / wait_for_active

Function wait_for_active

samples/stream_consumer.py:39–46  ·  view source on GitHub ↗
(client, table_name: str, timeout: float = 60.0)

Source from the content-addressed store, hash-verified

37 endpoint_url=ENDPOINT,
38 )
39def wait_for_active(client, table_name: str, timeout: float = 60.0) -> None:
40 deadline = time.monotonic() + timeout
41 while time.monotonic() < deadline:
42 resp = client.describe_table(TableName=table_name)
43 if resp["Table"]["TableStatus"] == "ACTIVE":
44 return
45 time.sleep(0.5)
46 raise TimeoutError(f"Table {table_name} did not become ACTIVE within {timeout}s")
47def writer_thread() -> None:
48 client = make_client()
49

Callers 1

mainFunction · 0.70

Calls 1

describe_tableMethod · 0.80

Tested by

no test coverage detected