-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add Fail handler to executor #1109
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. just need to rename some variables.
@@ -1281,6 +1281,48 @@ func (e *executor) handleAggregatePauses(ctx context.Context, evt event.TrackedE | |||
return res, goerr | |||
} | |||
|
|||
func (e *executor) Fail(ctx context.Context, runID ulid.ULID, err error) error { | |||
s, err := e.sm.Load(ctx, runID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the func argument should either be renamed from err
of the ones in the function should be renamed based on the warning.
This calls lifecycles after marking a function as failed.
25ec570
to
4d5af5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for? I'm guessing for cleaning up some of the logic we have duplicated around a few methods and always use this instead?
This calls lifecycles after marking a function as failed.
Type of change (choose one)
Checklist
Check our Pull Request Guidelines