https://prefect.io logo
Title
m

Mary Clair Thompson

08/27/2020, 6:35 PM
Hi folks! What's the proper Prefect method for _removing_/_unregistering_ a flow?
d

Dylan

08/27/2020, 6:36 PM
Hey @Mary Clair Thompson! Do you want to keep the flow’s history or are you okay deleting it?
There’s a delete button on the Flow page in the UI
m

Mary Clair Thompson

08/27/2020, 6:36 PM
i'd actually prefer to delete it.
yes so the question would be does that actually remove the history?
d

Dylan

08/27/2020, 6:37 PM
It deletes all objects associated with the flow (runs, tasks, logs, etc)
m

Mary Clair Thompson

08/27/2020, 6:37 PM
perfect.
d

Dylan

08/27/2020, 6:37 PM
It’s a postgres delete cascade
👍 1
you got it!
m

Mary Clair Thompson

08/27/2020, 6:37 PM
Is there a pythonic way to unregister?
ie the complement of flow.register()?
d

Dylan

08/27/2020, 6:38 PM
Not exactly
well
let me double check actually
m

Mary Clair Thompson

08/27/2020, 6:38 PM
haha cool, thanks.
d

Dylan

08/27/2020, 6:40 PM
Nah
You’d need to instantiate a client and use a graphql mutation
Client.graphql
If you wanted to contribute one we’d welcome the PR!
👍 1
m

Mary Clair Thompson

08/27/2020, 6:42 PM
ok good to know! I'll definitely look into adding that functionality 🙂