Replies: 2 comments
-
This seems a working but not too nice way to get a list of tasks for a flow. task_names = [name for name, t in my_flow.fn.__globals__.items() if isinstance(t, prefect.tasks.Task)] |
Beta Was this translation helpful? Give feedback.
0 replies
-
Alright, maybe my approach is not valid. I have made further research and tests and a flow won't know what kind of tasks it has until it is executed. So, the right approach may be to gather all those tasks to be executed in a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I list the tasks belonging to a Flow?
I can't find a simple method for the CLI, or on the web UI of the server.
Please enlighten me!
I have a bunch of tasks which are dynamically generated based on database tables or files in a directory. I prefer not to run them mapped, but as separate tasks. So, I would like to see what's possibly going to be executed, and what did I missed if something goes wrong during the flow execution, or just test them out one by one if needed.
flow.visualize() doesn't really help, and Graphviz has too many dependencies to install.
Any other suggestions?
Beta Was this translation helpful? Give feedback.
All reactions