Skip to content
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

Consider interop between retry.__ suite and possible retryable(fn, params) signature #97

Open
parzhitsky opened this issue Jun 21, 2021 · 0 comments
Labels
Domain: meta [Issue / PR] describes change in the development process, documentation, maintenance etc. Priority: high [Issue / PR] must be addressed as soon as possible Type: investigation [Issue / PR] addresses the need of gaining intel

Comments

@parzhitsky
Copy link
Member

parzhitsky commented Jun 21, 2021

Interesting: currently, the retry() function accepts an action parameter, which is a function with promise-constructor-executor-like signature:

// roughly
type Action = <Result>(resolve: Function, reject: Function, retry: Retrier) => Promise<Result>;
// roughly
type Executor = <Result>(resolve: Function, reject: Function) => Promise<Result>;

This means, that it would be backward compatible to provide those params as the second argument of retry(), as in:

const result = await retryable(db.connect, { retryDelay: ... });

… which frankly should've been the first choice of the function signature.

Originally posted by @parzhitsky in #96 (comment)

@parzhitsky parzhitsky added Domain: meta [Issue / PR] describes change in the development process, documentation, maintenance etc. Priority: high [Issue / PR] must be addressed as soon as possible Type: investigation [Issue / PR] addresses the need of gaining intel labels Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: meta [Issue / PR] describes change in the development process, documentation, maintenance etc. Priority: high [Issue / PR] must be addressed as soon as possible Type: investigation [Issue / PR] addresses the need of gaining intel
Projects
None yet
Development

No branches or pull requests

1 participant