diff --git a/sciluigi/audit.py b/sciluigi/audit.py index b0d72a3..462921d 100644 --- a/sciluigi/audit.py +++ b/sciluigi/audit.py @@ -21,8 +21,10 @@ def add_auditinfo(self, infotype, infoval): def _add_auditinfo(self, instance_name, infotype, infoval): dirpath = self.workflow_task.get_auditdirpath() - if not os.path.exists(dirpath): - os.makedirs(dirpath) + if not os.path.isdir(dirpath): + time.sleep(random.random()) + if not os.path.isdir(dirpath): + os.makedirs(dirpath) auditfile = os.path.join(dirpath, instance_name) if not os.path.exists(auditfile):