https://prefect.io logo
g

Grant

08/04/2023, 3:59 PM
What is the best method for having a flow kick-off after every successful completion of another flow which is scheduled every 15 mins? I haven't found documentation for this but if there are docs for it that would be helpful
j

Jake Kaplan

08/04/2023, 4:45 PM
Hey! You can
run_deployment()
inside of your flow run, maybe inside of the
on_completion
hook. here is a general example for how to use run deployment. Additionally if you're using Prefect Cloud, use can use automations, where you can trigger a flow to kick off after every success.
🙌 2
g

Grant

08/04/2023, 6:57 PM
Coming in clutch again, thank you @Jake Kaplan!
@Jake Kaplan I am trying to implement your suggestion and just need a bit more clarification; I am trying to have each of my flows in the list execute sequentially upon successful completion of the main flow. See screenshots. It looks like I need to pass in the main flow state to the start_other_flows() function somehow, can you help me understand how to do this?
j

Jake Kaplan

08/07/2023, 3:35 PM
I don't believe you need
@task
around
start_other_flows
it should just be a callable
👍 1
g

Grant

08/07/2023, 3:37 PM
You're right, and turns out I need to pass in variables from the event hook so I changed the function to this and it worked. Thank you!
🙌 1