Hi everyone! Is it possible to remove some tasks v...
# ask-community
g
Hi everyone! Is it possible to remove some tasks visualised in the DAG graph? Or otherwise hide some tasks? What I would like to is to extract a sub DAG basically. An alternative which would work would also be to aggregate some tasks in one task. Unfortunately, via code I cannot because I cannot run tasks from within another task (or at least I don’t know how given that I’ve got an error says I cannot run a tasks from within another task)
m
Have you tried subflows?
g
do you have any example?
g
I will check it, thanks!
@Mattijs De Paepe looks promising. There is one thing I do not see in the doc which is how to make a subflow wait for another one to finish. For the tasks we can use
.submit(wait_for=[task1, task2])
but flows do not have submit method
m
“Subflows will block execution of the parent flow until completion. However, asynchronous subflows can be run in parallel by using AnyIO task groups or asyncio.gather.”
g
I think that could work. Do you have any example about running subflows in parallel?
m
No sorry
👍 1