MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _run_compile_with_retry

Function _run_compile_with_retry

openkb/cli.py:426–439  ·  view source on GitHub ↗
(coro_factory, label: str)

Source from the content-addressed store, hash-verified

424
425
426def _run_compile_with_retry(coro_factory, label: str) -> None:
427 click.echo(f" {label}...")
428 for attempt in range(2):
429 try:
430 asyncio.run(coro_factory())
431 return
432 except Exception as exc:
433 if attempt == 0:
434 click.echo(" Retrying compilation in 2s...")
435 time.sleep(2)
436 else:
437 click.echo(f" [ERROR] Compilation failed: {exc}")
438 logger.debug("Compilation traceback:", exc_info=True)
439 raise
440
441
442def add_single_file(

Callers 2

_add_single_file_lockedFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected