(memory_limit_float = 85.0, check_interval = 5)
| 31 | |
| 32 | |
| 33 | def 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) |
no test coverage detected