Is there a way to extract the number of remaining ...
# ask-community
a
Is there a way to extract the number of remaining tasks in a flow from something like the
prefect.client.client.FlowRunInfoResult
that's returned by
client.get_flow_run_info()
?
It seems like I can get a number of top level tasks using
client.get_flow_run_info().task_runs
but not sure if there is a way to count children tasks.
k
I think you might need to use the graphQL API to count the number of tasks in that flow run with a SCHEDULED state. What are you trying to do? Maybe there is an easier way?
Actually it should be the Pending state for this one