Anjaneyulu K
@flow(name="Status check") def run(): a= "hello" if(condition): success else: run() if __name__ == "__main__": run()
Anna Geller
@flow(name="Status check") def run(): a= task1 output if(task1 output condition): running task2 else: wait(10) run()
from prefect import task, flow import time import random from prefect.deployments import Deployment @task def getNumber(x): return x @task def hello(): print("Hello world") @flow(name="Status check") def run(x): a= getNumber(x) if a == 2: hello() else: time.sleep(5) run(x) if __name__ == "__main__": run(random.randint(0,9)) deployment = Deployment.build_from_flow( flow=run, name="ex-dep2", version=1, work_queue_name="demo-exp1" ) deployment.apply()
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.