hi, is it possible to add trigger in Prefect provi...
# ask-community
t
hi, is it possible to add trigger in Prefect provided tasks? for example, I want to add a
always_run/all_finished
trigger to this task, but I can’t simply just add it to the end of parameters. Because this is not a
@task
way of definition, don’t know how to:
Copy code
deletePod = kpod.DeleteNamespacedPod(kubernetes_api_key_secret=None)
k
Hey, you can pass it in the init of
DeleteNamespacedPod()
like
DeleteNamespacedPod(trigger=always_run)
because
DeleteNamespacedPod
is a subclass of
Task
. Source here . It then uses the
super.init()
upvote 1
@task
and
Task
share those kwargs
t
I see. Maybe I did something wrong. Thanks!