Skip to content

feat: with retry helper#390

Open
wangyb-A wants to merge 1 commit into
mainfrom
feat/withRetry
Open

feat: with retry helper#390
wangyb-A wants to merge 1 commit into
mainfrom
feat/withRetry

Conversation

@wangyb-A
Copy link
Copy Markdown
Contributor

@wangyb-A wangyb-A commented May 12, 2026

Issue #, if available: #361

Ref pr: aws/aws-durable-execution-sdk-js#505

Description

  • Runs func(ctx, attempt) starting at attempt = 1.
  • On rejection → calls retryStrategy. If shouldRetry: true, context.waits for the returned delay, then re-runs the whole function.
  • On fulfillment → returns the value.
  • On the final failure → rethrows.
  • By default wraps the loop in context.runInChildContext for isolation and so all attempts + backoff waits appear as a single grouped operation in execution history. Opt out via wrap_with_run_in_child_context = false
iShot_2026-05-12_15 00 33

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wangyb-A wangyb-A marked this pull request as ready for review May 12, 2026 22:37
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