-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle sub task #38
Comments
Creating tasks within tasks is not supported by transwarp (unless you're using a separate executor but it still feels somewhat hacky). What is encouraged instead is to construct a graph of tasks where your current "sub_task" would be one of the parents to "main_task". Makes it much easier to reason about your tasks and their inter-dependencies. Does that make sense? |
Do you have some ideas in mind about this hacky executor ? |
To make your code above work you need to use a separate executor, e.g.:
Adding some sort of subgraph support to transwarp doesn't really make sense. With transwarp you can build up graphs and that's it. Sure, you can create another graph within a task. I wouldn't call that a subgraph tho. A task is generic, it can do whatever. |
Hello,
In case that you create tasks inside a task:
How can we handle this issue? If we imagine that I have a single worker in my pool, my main task will be paused until my sub task is finished but because the worker is already used by the main_task, my sub_task is blocked because there is no free worker.
Regards
The text was updated successfully, but these errors were encountered: