Generally, is there an equivalent in Prefect 2.0 of Prefect 1.0 triggers?
In particular, here’s my use case: What is the prefect 2 equivalent to
from prefect.triggers import all_finished
@task(trigger=all_finished)
def always_run():
print("Running regardless of upstream task's state")
from prefect 1?
This thread suggests that it’s using .submit() on the task that you want to always run regardless of upstream task failures? If so, that seems less flexible than prefect 1 triggers; but maybe I’m missing something?
Sorry, instead of less flexible i should have said less clear/easy. It would be nice to be able to just pass a parameter to the @task decorator as in prefect 1
I don’t see automations/triggers available in the prefect python client. However, I do see automations are in the REST API. Are they coming to the python client?
I don’t see an example of having a task always run regardless of upstream tasks. Can you show me an example?
The trigger functionality is part of Automations, which is a Cloud-only feature, that’s why you won’t find it in the Python client. You can sign up for a free tier (no time limits) here: