Hey Team, I have a query, I am running flow.register() from within the Flask app and I could see as many time Flask app is run, I could see new version from UI. How do I avoid re-registering of the flow? Thanks
n
nicholas
08/28/2020, 3:38 PM
Hi @Vipul - the most straightforward way to handle this would be to either register the flow elsewhere (maybe as part of a manual command that can be run at will), or by querying the API to see if the flow has already been registered with a query like this:
Copy code
query {
flow(where: { name: { _eq: "My Flow" } }) {
id
}
}
v
Vipul
08/28/2020, 3:41 PM
Thanks @nicholas The problem would be the Flask app should know the flow id so that it can trigger this flow based on the Flask end points are hit. Thanks for pointing me to those query but I am not sure how do I put that to code in the Flask app