MCPcopy Index your code
hub / github.com/diffgram/diffgram / check_and_wait_for_memory

Function check_and_wait_for_memory

shared/utils/memory_checks.py:33–39  ·  view source on GitHub ↗
(memory_limit_float = 85.0, check_interval = 5)

Source from the content-addressed store, hash-verified

31
32
33def check_and_wait_for_memory(memory_limit_float = 85.0, check_interval = 5):
34 while True:
35 if is_memory_available(memory_limit_float = memory_limit_float):
36 return True
37 else:
38 logger.warn("No memory available, waiting. There is no harm if processing large amount please wait.")
39 time.sleep(check_interval)

Callers 3

loadMethod · 0.90
main_entryMethod · 0.90

Calls 1

is_memory_availableFunction · 0.85

Tested by

no test coverage detected