From 72409bd12d5d55c9a4aa679ff93b615375bc524d Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Fri, 26 Mar 2021 14:48:38 +0100 Subject: [PATCH] Fix race condition --- nlp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nlp b/nlp index 4390af9..47b0388 100755 --- a/nlp +++ b/nlp @@ -89,6 +89,7 @@ class NLPPipeline(WorkflowRunner): ' # vrt creation # ' ################################################## ''' + vrt_creation_tasks = [] for i, job in enumerate(self.jobs): output_file = os.path.join(job.output_dir, '{}.vrt'.format(job.name)) # noqa nlp_file = os.path.join(job.output_dir, '{}.nopaque-stand-off.json'.format(job.name)) # noqa @@ -99,6 +100,7 @@ class NLPPipeline(WorkflowRunner): deps = 'nlp_-_{}'.format(i) lbl = 'vrt_creation_-_{}'.format(i) task = self.addTask(command=cmd, dependencies=deps, label=lbl) + vrt_creation_tasks.append(task) ''' ' ################################################## @@ -116,7 +118,7 @@ class NLPPipeline(WorkflowRunner): cmd += ' -i "*.vrt" "*.json"' cmd += ' && ' cmd += 'cd -' - deps = nlp_tasks + deps = vrt_creation_tasks lbl = 'zip_creation' task = self.addTask(command=cmd, dependencies=deps, label=lbl) zip_creation_tasks.append(task)