Skip to content

Commit

Permalink
Update README.md (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb authored Mar 11, 2024
1 parent ee87ddb commit 5e65cce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ func AccountCreated(ctx context.Context, input inngestgo.Input[AccountCreatedEve

// Run a step which emails the user. This automatically retries on error.
// This returns the fully typed result of the lambda.
result := step.Run(ctx, "on-user-created", func(ctx context.Context) (bool, error) {
result, err := step.Run(ctx, "on-user-created", func(ctx context.Context) (bool, error) {
// Run any code inside a step.
result, err := emails.Send(emails.Opts{})
return result, err
})
if err != nil {
// This step retried 5 times by default and permanently failed.
return err.
}
// `result` is fully typed from the lambda
_ = result

Expand Down

0 comments on commit 5e65cce

Please sign in to comment.