diff options
Diffstat (limited to 'node_modules/retry/Readme.md')
-rw-r--r-- | node_modules/retry/Readme.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/retry/Readme.md b/node_modules/retry/Readme.md index f044025c0..09d9c8a81 100644 --- a/node_modules/retry/Readme.md +++ b/node_modules/retry/Readme.md @@ -110,6 +110,21 @@ Returns a new `timeout` (integer in milliseconds) based on the given parameters. `retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13). +### retry.wrap(obj, [options], [methodNames]) + +Wrap all functions of the `obj` with retry. Optionally you can pass operation options and +an array of method names which need to be wrapped. + +``` +retry.wrap(obj) + +retry.wrap(obj, ['method1', 'method2']); + +retry.wrap(obj, {retries: 3}); + +retry.wrap(obj, {retries: 3}, ['method1', 'method2']); +``` +The `options` object can take any options that the usual call to `retry.operation` can take. ### new RetryOperation(timeouts) @@ -167,6 +182,8 @@ retry is licensed under the MIT license. #Changelog +0.7.0 Some bugfixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). + 0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in miliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. 0.5.0 Some minor refactorings. |