Anjaneyulu K
11/08/2022, 10:29 PM@flow(name="Status check")
def run():
    a= "hello"
    if(condition):
        success
    else:
        run()
if __name__ == "__main__":
   run()Anna Geller
Anjaneyulu K
11/08/2022, 11:59 PM@flow(name="Status check")
def run():
    a= task1 output
    if(task1 output condition):
        running task2
    else:
       wait(10)
        run()Anjaneyulu K
11/08/2022, 11:59 PMAnjaneyulu K
11/09/2022, 12:00 AMAnna Geller
Anjaneyulu K
11/09/2022, 12:22 AMfrom 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()Anjaneyulu K
11/09/2022, 12:22 AMAnna Geller
