Skip to content

Commit

Permalink
Avoid using lock unless parallel mode is present (#3014)
Browse files Browse the repository at this point in the history
Avoid various problems caused by the lock presence.

Fixes: #2905
Fixes: #2985
  • Loading branch information
ssbarnea authored Dec 19, 2020
1 parent 5e62c07 commit 2b9d832
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/molecule/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ def ephemeral_directory(self):

path = ephemeral_directory(project_scenario_directory)

# TODO(ssbarnea): Tune or make the retry logic configurable once we have enough data
if not self._lock:
if os.environ.get("MOLECULE_PARALLEL", False) and not self._lock:
self._lock = open(os.path.join(path, ".lock"), "w")
for i in range(1, 5):
try:
Expand Down

0 comments on commit 2b9d832

Please sign in to comment.