diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-13 21:53:45 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-13 21:53:45 +0100 |
commit | 18c96ab6926658d6707f1f3be935078f1cb08411 (patch) | |
tree | 418195a292ce8811679d4c2b1cb7bb0316669d62 /node_modules/async/retryable.js | |
parent | 9657e01be14fa5baa4067da65aff94faf6c973e0 (diff) | |
download | wallet-core-18c96ab6926658d6707f1f3be935078f1cb08411.tar.xz |
node modules
Diffstat (limited to 'node_modules/async/retryable.js')
-rw-r--r-- | node_modules/async/retryable.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/node_modules/async/retryable.js b/node_modules/async/retryable.js deleted file mode 100644 index bf6e2fbc7..000000000 --- a/node_modules/async/retryable.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (opts, task) { - if (!task) { - task = opts; - opts = null; - } - return (0, _initialParams2.default)(function (args, callback) { - function taskFn(cb) { - task.apply(null, args.concat([cb])); - } - - if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback); - }); -}; - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it - * retryable, rather than immediately calling it with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry` - * @param {Function} task - the asynchronous function to wrap - * @returns {Functions} The wrapped function, which when invoked, will retry on - * an error, based on the parameters specified in `opts`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */
\ No newline at end of file |