Bouke Krom
07/24/2021, 8:36 AMFlow object in Python. So I was thinking I'd query an existing flow (possibly a special 'template' one), modify it and insert it again, but it feels kind of hacky. Any thoughts?Kevin Kho
Bouke Krom
07/26/2021, 6:57 AMKevin Kho
Bouke Krom
07/26/2021, 2:08 PMBouke Krom
07/26/2021, 2:12 PMKevin Kho
Bouke Krom
07/26/2021, 2:48 PM{flow_group(where: {id: {_eq: $low_id}}){
id
schedule
}}
modifying the schedule list as needed and then setting it again.Bouke Krom
07/26/2021, 2:48 PMKevin Kho
Bouke Krom
07/26/2021, 3:06 PMKevin Kho
create_flow is the endpoint to register and you can see it in action by checking the code for Client.register hereBouke Krom
07/26/2021, 3:38 PMBouke Krom
07/29/2021, 8:43 AMserialized_flow data from the GraphQL query, then modify it to your heart's content and register it with the usual client.register. Btw any reason that the client interface doesnt provide get_flow or delete_flow methods (while it does for flow runs)?Kevin Kho
client.graphql should be enough to put the query together. Do you need help with that?Bouke Krom
07/30/2021, 11:58 AMKevin Kho
Bouke Krom
08/19/2021, 10:51 AMLocalRun on an agent. I tried querying a template flow, deserializing it, modifying it, then registering it again. This seems to work fine but when running, it fails on storage: Failed to load and execute Flow's environment: ValueError('Flow is not contained in this Storage') . It seems that on registering, the default LocalStorage is populated with paths from the system that calls register, but I want it to be populated with paths from the agent.. Any ideas?Bouke Krom
08/19/2021, 10:52 AMKevin Kho
Local storage takes in 2 things that might help. stored_as_script and path, which will point to a location the agent will retrieve it from. If you don’t store as script (default), the Flow gets serialized and saved locally, so of course the agent won’t find it. You need stored_as_script=True and the path=path/on/agent and this might work.