acoustic-carpenter-78188
11/15/2023, 7:15 PMfrom datetime import timedelta
from flytekit import workflow, approve, conditional, task
@task
def check_condition() -> str:
return "WARN"
@task
def noop_task() -> str:
return "OUTPUT"
@workflow
def wf() -> str:
check = check_condition()
noop = noop_task()
qc = (
conditional("pass-qc")
.if_(check == "PASS")
.then(noop)
.elif_(check == "WARN")
.then(approve(noop, "approve-qc", timeout=timedelta(hours=2)))
.else_()
.fail("One or more samples failed QC.")
)
return qc
run with pyflyte run --remote repro.py wf
Screenshots
Screenshot 2023-11-15 at 11 13 13 AM
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte