temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Handle NextRetryDelay option in workflow task failures

Open gow opened this issue 1 year ago • 0 comments

What changed?

Workflow tasks can now return an application error with NextRetryDelay option to customize when the workflow task will be retried again.

  return temporal.NewApplicationError(
    "some retryable error",
    "SomeType",
    temporal.ApplicationErrorOptions{NextRetryDelay: 2 * time.Minute},
  )

Why?

Currently Activity tasks can customize the next retry time. This is bringing the same feature to workflow tasks as well.

How did you test it?

Added unit tests. Also added a test to assert next retry delay customization in activities.

Potential risks

Documentation

Is hotfix candidate?

No

gow avatar May 17 '24 04:05 gow