Proposal: State & failure handlers could be Tasks themselves #4040
Unanswered
peterroelants
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently
Currently a Task's
on_failure
orstate_handlers
should be regular methods (Callable) with a specified signature.Proposed
Expand state handlers from regular methods to being Prefect Tasks themselves.
Why
Allowing state/failure handlers could provide the benefit of Prefect's ways for dealing with "negative engineering", such as retries, for those state handlers.
For example, I have a few state handlers that write a notification to a Kafka topic to signal failure, however calling the Kafka broker could be via an unreliable network, and retries are sometimes required.
Other potential benefits:
Beta Was this translation helpful? Give feedback.
All reactions