()
| 134 | |
| 135 | @contextmanager |
| 136 | def _cluster_config_lock() -> Iterator[None]: |
| 137 | with open(_INFERENCE_CONFIG_LOCK, "a+", encoding="utf-8") as lock_file: |
| 138 | fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX) |
| 139 | try: |
| 140 | yield |
| 141 | finally: |
| 142 | fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN) |
| 143 | |
| 144 | |
| 145 | @pytest.fixture |
no outgoing calls
no test coverage detected