-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Domain: meta[Issue / PR] describes change in the development process, documentation, maintenance etc.[Issue / PR] describes change in the development process, documentation, maintenance etc.Priority: high[Issue / PR] must be addressed as soon as possible[Issue / PR] must be addressed as soon as possibleType: investigation[Issue / PR] addresses the need of gaining intel[Issue / PR] addresses the need of gaining intel
Description
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)
Metadata
Metadata
Assignees
Labels
Domain: meta[Issue / PR] describes change in the development process, documentation, maintenance etc.[Issue / PR] describes change in the development process, documentation, maintenance etc.Priority: high[Issue / PR] must be addressed as soon as possible[Issue / PR] must be addressed as soon as possibleType: investigation[Issue / PR] addresses the need of gaining intel[Issue / PR] addresses the need of gaining intel