eventual icon indicating copy to clipboard operation
eventual copied to clipboard

Activity and workflow retry

Open thantos opened this issue 3 years ago • 0 comments

    We need to implement retry :-)

On definition:

const credit = activity({ retry: { onErrors: [...], backoffFactor: 1.5, initialDelay: 1 } }, async () => {});

On invoke

await credit.withRetry({ ... })(to, amount);

Arbitrary

note: there may be more performance issues with the arbitrary approach as we'll likely need to return to the workflow to retry instead of acting in the activity space.

await retry({...}, () => credit(to, amount));

Originally posted by @thantos in https://github.com/functionless/eventual/pull/134#discussion_r1058905800

thantos avatar Dec 29 '22 13:12 thantos