https://prefect.io logo
Title
m

massintha azamoum

05/26/2023, 3:11 PM
Hi everyone, I have a Prefect task that starts a child process that can take a while to run. When I cancel the flow, the child process doesn't get killed with it and this takes resources for nothing. Is there a way to kill it?
n

Nicholas Torba

05/26/2023, 3:15 PM
I asked the same question yesterday, but running subflows from parent flows. Not sure how this cancellation works
m

massintha azamoum

05/26/2023, 3:24 PM
By looking at the process tree I see that the process of the flow run and the one that I start have as a parent the agent process. So when cancelling it does kill the process of the flow run but not mine. That's why cancelling doesn't kill any process started by the flow run but then how do you do it 😅
n

Nicholas Torba

05/30/2023, 3:48 PM
@massintha azamoum did you ever find a solution for this?
m

massintha azamoum

05/30/2023, 3:50 PM
Nothing yet unfortunately
n

Nicholas Torba

05/30/2023, 3:54 PM
I'm trying to figure out how to identify the subflows of a flow via the api
but I haven't found a way to do that either. the child_flow_run_id field of the api repsonse is None, even though I know that there is a subflow
m

massintha azamoum

05/30/2023, 3:56 PM
I never tried to do this. I know how to get the parent info from a subflow but not the other way around