Skip to content

Commit 2c09058

Browse files
authored
Fix race condition in project directory creation (#358)
1 parent 32fc18e commit 2c09058

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

awx/main/tasks/jobs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,7 @@ def release_lock(self, project):
377377
self.lock_fd = None
378378

379379
def acquire_lock(self, project, unified_job_id=None):
380-
if not os.path.exists(settings.PROJECTS_ROOT):
381-
os.mkdir(settings.PROJECTS_ROOT)
380+
os.makedirs(settings.PROJECTS_ROOT, exist_ok=True)
382381

383382
lock_path = project.get_lock_file()
384383
if lock_path is None:

0 commit comments

Comments
 (0)