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