Hi folks, what is the simplest way in prefect to s...
# ask-community
m
Hi folks, what is the simplest way in prefect to specify that a task only execute based on the value of a boolean parameter, otherwise should get skipped ? nevermind - I just spotted signals
Copy code
from prefect.engine import signals

@task
def signal_task(run_task: bool):
   if not run_task:
       raise signals.SKIP()
k
Hey @Marwan Sarieddine, There are probably a few ways depending on what you're doing, but I'd say the case operator with maybe some SKIP signal action.
m
@Kyle Moon-Wright thank you!
k
You beat me! Good stuff. 👍