Skip to content

Commit

Permalink
Avoid using lock unless parallel mode is present
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 committed Dec 19, 2020
1 parent 0493166 commit da8f491
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 da8f491

Please sign in to comment.