Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo of retry handlers returning a substitute value rather than choosing to retry or fail #3553

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benclifford
Copy link
Collaborator

This is a prototype I've made for @svandenhaute but maybe also of interest to Micha Pfeiffer

This prototype allows a retry handler to decide that on a particular task failure, the task should complete with a value of its own choosing.

In the scenario I talked of with @svandenhaute this would allow a tasks exception to be replaced by a substitute value that later other tasks would be able to observe - rather than task flow stopping - and so in a sense allows reification of the exception in a regular value.

In Micha's case, this may be a route to "permanently failing" a task into the checkpoint database, so that it does not re-run when restarting from checkpoints. (or might not - because this code means that other parts of a workflow will no longer observe a failure)

The supplied test case shows catching a particular exception and making that task not fail but instead complete with the value 8.

I'm unclear how this works in practice but the prototype was quick to make and I appreciate feedback.

Changed Behaviour

none

Type of change

  • New feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant