clean up locks when EasyBuild session is cancelled with signal like SIGTERM#3291
Merged
akesandgren merged 10 commits intoeasybuilders:developfrom May 1, 2020
Merged
clean up locks when EasyBuild session is cancelled with signal like SIGTERM#3291akesandgren merged 10 commits intoeasybuilders:developfrom
akesandgren merged 10 commits intoeasybuilders:developfrom
Conversation
akesandgren
reviewed
Apr 27, 2020
Comment on lines
+1518
to
+1522
| if wait_on_lock: | ||
| while os.path.exists(lock_path): | ||
| print_msg("lock %s exists, waiting %d seconds..." % (lock_path, wait_on_lock), | ||
| silent=build_option('silent')) | ||
| time.sleep(wait_on_lock) |
Contributor
There was a problem hiding this comment.
I would expect wait_on_lock to be the max time to wait, not how long between checks. That's what you would normally do in this situation, i.e. specify a max time to wait.
Member
Author
There was a problem hiding this comment.
Yeah, we need a way to limit the time you're waiting for a lock, and the semantics of --wait-on-lock is a bit weird right now.
So, I changed things in d879cda:
--wait-on-lockstill works as before (0(the default) implies no waiting (raise an error if lock is already there), a value implies enabling waiting with interval of specified number of seconds), but is deprecated;--wait-on-lock-limitcan be used to i) enable waiting for lock to be released, ii) specify a maximum waiting time (if set to0is implies no waiting (raise error if lock is there), if set to-1it implies waiting indefinitely);--wait-on-lock-intervalcan be used to specify the interval for re-checking whether the lock has been released (default 60 sec.)
akesandgren
requested changes
Apr 27, 2020
akesandgren
requested changes
May 1, 2020
…it has been reached
Contributor
|
Going in, thanks @boegel! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cfr. #3280