Fix caching in remove_task_output.
@@ -426,7 +426,8 @@ def print_task_status(task, max_depth=0, target_depth=0, flags=None):
if dep in done:
print(offset + "- " + colored("outputs already checked", "yellow"))
- else:
+ continue
+
done.append(dep)
for outp in luigi.task.flatten(dep.output()):
@@ -474,15 +475,15 @@ def remove_task_output(task, max_depth=0, mode=None, include_external=False):
print(offset + "- " + colored("task is external, skip", "yellow"))
continue
+ if dep in done:
+ print(offset + "- " + colored("outputs already removed", "yellow"))
+ continue
+
if mode == "i":
task_mode = query_choice(offset + " walk through outputs?", ("y", "n"), default="y")
if task_mode == "n":
continue
- if dep in done:
- print(offset + "- " + colored("outputs already removed", "yellow"))
- continue
-
done.append(dep)
for outp in luigi.task.flatten(dep.output()):
