Federico Zambelli04/21/2023, 10:00 AM
What if in certain situations, i want to run only the 2nd flow? Is that possible / reasonable ?
@flow def first_flow(): ... @flow def second_flow(): ... def main(): first_flow() second_flow()
Deceivious04/21/2023, 10:05 AM
if <cond1>: first_flow() if <cond2>: second_flow()
Federico Zambelli04/21/2023, 10:06 AM
Deceivious04/21/2023, 10:08 AM
. Its simple and it works.
a poor man's solution
Federico Zambelli04/21/2023, 10:09 AM
Deceivious04/21/2023, 11:16 AM
But yes prefect doesnt have in built support for this use case as far as I am aware.
def generate_or_load_items(): #just an example if file.exists(): return load_items() return generate_items()
Federico Zambelli04/21/2023, 11:17 AM