When running doit with -n
option, the task doesn't seem to wait for the file_dep
to be created by other sub-tasks. Here is a simple code that tries to show the issue:
def task_pexample():
yield {
"name":"test1",
"actions": ["sleep 5", "touch tmp.txt"],
"targets":["tmp.txt"]
}
yield {
"name":"test2",
"file_dep":["tmp.txt"],
"targets":["tmp2.txt"],
"actions": ["cp tmp.txt tmp2.txt"],
}
doit -s pexample
runs without a problem. However when running doit -n 2 -s pexample
, it starts the second subtask right away, without waiting for the first one to complete. This then generates an error since the file doesn't exist.
My question is whether doit
does or doesn't look for such dependencies in subtask when running in parallel?