mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Merge pull request #3076 from efiop/rwlock_sync
rwlock: flush and fsync
This commit is contained in:
@@ -50,6 +50,9 @@ def _edit_rwlock(lock_dir):
|
||||
yield lock
|
||||
with open(path, "w+") as fobj:
|
||||
json.dump(lock, fobj)
|
||||
# NOTE: flush and fsync to ensure that rwlock contents are saved
|
||||
fobj.flush()
|
||||
os.fsync(fobj.fileno())
|
||||
|
||||
|
||||
def _infos_to_str(infos):
|
||||
|
||||
Reference in New Issue
Block a user