Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix file lock bug #3207

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nni/tools/nnictl/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ def _release(self):
return None

def get_file_lock(path: string, stale=-1):
return SimplePreemptiveLock(path + '.lock', stale=-1)
return SimplePreemptiveLock(path + '.lock', stale=stale)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you checked that if you manually create a lock file, does it block new experiment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it does not block new experiment. The previous situation was due to always stale=-1, means lock never expires, now fix it.