Commit 26895d38 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

re-organise workflow definition to add management task after checking if we...

re-organise workflow definition to add management task after checking if we have something to do. Add comments
parent e41984cd
......@@ -95,8 +95,6 @@ def run_project_analysis_if_needed(project):
tasks = []
post_worktable_tasks = []
tasks.append(ensure_space_in_project_dir_task.si(project.id))
if not os.path.exists(project.get_worktable_path()):
tasks.append(create_project_worktable.si(project.id))
......@@ -115,7 +113,11 @@ def run_project_analysis_if_needed(project):
if len(tasks) + len(post_worktable_tasks) == 0:
return
main_wf = chain(
# first we check again that there is enough disk space
ensure_space_in_project_dir_task.si(project.id),
# we run the main task(s)
*tasks,
# we then compute the missing charts
group(post_worktable_tasks),
# it is mandatory to add a task that do nothing if group is used in order to have a success/failure status
dummy_task.si(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment