MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / wait_func

Function wait_func

nano_graphrag/_utils.py:284–291  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

282
283 @wraps(func)
284 async def wait_func(*args, **kwargs):
285 nonlocal __current_size
286 while __current_size >= max_size:
287 await asyncio.sleep(waitting_time)
288 __current_size += 1
289 result = await func(*args, **kwargs)
290 __current_size -= 1
291 return result
292
293 return wait_func
294

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected