MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / build_dep

Method build_dep

misc/python/materialize/mzbuild.py:1459–1478  ·  view source on GitHub ↗
(dep)

Source from the content-addressed store, hash-verified

1457 )
1458
1459 def build_dep(dep):
1460 end_time = time.time() + 600
1461 while True:
1462 if time.time() > end_time:
1463 raise TimeoutError(
1464 f"Timed out in {dep.name} waiting for {[dep2 for dep2 in dep.dependencies if dep2 not in built_deps]}"
1465 )
1466 with lock:
1467 if all(dep2 in built_deps for dep2 in dep.dependencies):
1468 break
1469 time.sleep(0.01)
1470 for attempts_remaining in reversed(range(3)):
1471 try:
1472 dep.build(prep, push=dep.publish)
1473 with lock:
1474 built_deps.add(dep.name)
1475 break
1476 except Exception:
1477 if not dep.publish or attempts_remaining == 0:
1478 raise
1479
1480 if deps_to_build:
1481 with ThreadPoolExecutor(max_workers=len(deps_to_build)) as executor:

Callers

nothing calls this directly

Calls 5

TimeoutErrorEnum · 0.85
allFunction · 0.85
sleepMethod · 0.45
buildMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected