Is there a way to run a dependent flow when runnin...
# ask-community
b
Is there a way to run a dependent flow when running locally for testing without needing to run a prefect server? Using the built-in task (https://docs.prefect.io/core/idioms/flow-to-flow.html) calls to the API which we normally don’t run to keep development lightweight. We add a main to our flows that looks something like:
Copy code
def main():
  state = flow.run(executor=LocalExecutor())
  parameters = {...}
k
Hey @Brad I, the only way to do this is to create your own copy of
StartFlowRun
or
create_flow_run
that uses
context.get("running_with_backend")
and then creates a flow run or
flow.run()
. You’d have to create a task that wraps around these
b
Thanks, will give that a shot