I have a `deployment` that runs `Flow A` and then ...
# ask-community
t
I have a
deployment
that runs
Flow A
and then
Flow B
. However, I would also like to trigger
Flow B
separately without runing
Flow A
. Do I need to create a separate deployment for
Flow B
?
n
hi @Tri - it depends you could decide to only call B at runtime
Copy code
@flow
def parent(inputs):

  should_run_a = _derive_should_run_a(inputs)

  if should_run_a:
    flow_a()

  flow_b()
or instead yea you can split out
flow_b
to be its own deployment, its mostly up to you on how you want to structure things
t
thank you for your reply @Nate. Currently I'm creating a separate deployment, but didn't know if that was "anti-pattern", I have also thought of the first approach! I asked the question to make sure I was not doing anything weird with Prefect. Thank you for confirming my approach
n
Currently I'm creating a separate deployment, but didn't know if that was "anti-pattern"
not at all. that's a very common reason to create a deployment sure thing!