(lock_path, out_file_path)
| 9 | |
| 10 | |
| 11 | def _acquire_lock(lock_path, out_file_path): |
| 12 | with library.python.filelock.FileLock(lock_path): |
| 13 | with open(out_file_path, "a") as out: |
| 14 | out.write("{}:{}\n".format(os.getpid(), time.time())) |
| 15 | time.sleep(2) |
| 16 | |
| 17 | |
| 18 | def test_filelock(): |