Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html_old /
iNetty /
node_modules /
async /
Delete
Unzip
Name
Size
Permission
Date
Action
dist
[ DIR ]
drwxr-xr-x
2022-04-21 14:27
internal
[ DIR ]
drwxr-xr-x
2022-04-21 14:27
CHANGELOG.md
28.59
KB
-rw-r--r--
2022-04-21 14:24
LICENSE
1.04
KB
-rw-r--r--
2022-04-21 14:24
README.md
2.48
KB
-rw-r--r--
2022-04-21 14:24
all.js
1.64
KB
-rw-r--r--
2022-04-21 14:24
allLimit.js
1.51
KB
-rw-r--r--
2022-04-21 14:24
allSeries.js
1.25
KB
-rw-r--r--
2022-04-21 14:24
any.js
1.72
KB
-rw-r--r--
2022-04-21 14:24
anyLimit.js
1.55
KB
-rw-r--r--
2022-04-21 14:24
anySeries.js
1.28
KB
-rw-r--r--
2022-04-21 14:24
apply.js
1.8
KB
-rw-r--r--
2022-04-21 14:24
applyEach.js
1.74
KB
-rw-r--r--
2022-04-21 14:24
applyEachSeries.js
1.25
KB
-rw-r--r--
2022-04-21 14:24
asyncify.js
3.42
KB
-rw-r--r--
2022-04-21 14:24
auto.js
9.61
KB
-rw-r--r--
2022-04-21 14:24
autoInject.js
6.33
KB
-rw-r--r--
2022-04-21 14:24
bower.json
245
B
-rw-r--r--
2022-04-21 14:24
cargo.js
4.54
KB
-rw-r--r--
2022-04-21 14:24
compose.js
1.52
KB
-rw-r--r--
2022-04-21 14:24
concat.js
1.55
KB
-rw-r--r--
2022-04-21 14:24
concatLimit.js
2.11
KB
-rw-r--r--
2022-04-21 14:24
concatSeries.js
1.24
KB
-rw-r--r--
2022-04-21 14:24
constant.js
1.72
KB
-rw-r--r--
2022-04-21 14:24
detect.js
2.16
KB
-rw-r--r--
2022-04-21 14:24
detectLimit.js
1.72
KB
-rw-r--r--
2022-04-21 14:24
detectSeries.js
1.32
KB
-rw-r--r--
2022-04-21 14:24
dir.js
1.26
KB
-rw-r--r--
2022-04-21 14:24
doDuring.js
2.13
KB
-rw-r--r--
2022-04-21 14:24
doUntil.js
1.34
KB
-rw-r--r--
2022-04-21 14:24
doWhilst.js
2.02
KB
-rw-r--r--
2022-04-21 14:24
during.js
2.15
KB
-rw-r--r--
2022-04-21 14:24
each.js
2.77
KB
-rw-r--r--
2022-04-21 14:24
eachLimit.js
1.53
KB
-rw-r--r--
2022-04-21 14:24
eachOf.js
3.29
KB
-rw-r--r--
2022-04-21 14:24
eachOfLimit.js
1.38
KB
-rw-r--r--
2022-04-21 14:24
eachOfSeries.js
1.11
KB
-rw-r--r--
2022-04-21 14:24
eachSeries.js
1.18
KB
-rw-r--r--
2022-04-21 14:24
ensureAsync.js
2.46
KB
-rw-r--r--
2022-04-21 14:24
every.js
1.64
KB
-rw-r--r--
2022-04-21 14:24
everyLimit.js
1.51
KB
-rw-r--r--
2022-04-21 14:24
everySeries.js
1.25
KB
-rw-r--r--
2022-04-21 14:24
filter.js
1.49
KB
-rw-r--r--
2022-04-21 14:24
filterLimit.js
1.31
KB
-rw-r--r--
2022-04-21 14:24
filterSeries.js
1.21
KB
-rw-r--r--
2022-04-21 14:24
find.js
2.16
KB
-rw-r--r--
2022-04-21 14:24
findLimit.js
1.72
KB
-rw-r--r--
2022-04-21 14:24
findSeries.js
1.32
KB
-rw-r--r--
2022-04-21 14:24
foldl.js
2.61
KB
-rw-r--r--
2022-04-21 14:24
foldr.js
1.5
KB
-rw-r--r--
2022-04-21 14:24
forEach.js
2.77
KB
-rw-r--r--
2022-04-21 14:24
forEachLimit.js
1.53
KB
-rw-r--r--
2022-04-21 14:24
forEachOf.js
3.29
KB
-rw-r--r--
2022-04-21 14:24
forEachOfLimit.js
1.38
KB
-rw-r--r--
2022-04-21 14:24
forEachOfSeries.js
1.11
KB
-rw-r--r--
2022-04-21 14:24
forEachSeries.js
1.18
KB
-rw-r--r--
2022-04-21 14:24
forever.js
1.9
KB
-rw-r--r--
2022-04-21 14:24
groupBy.js
2.08
KB
-rw-r--r--
2022-04-21 14:24
groupByLimit.js
2.32
KB
-rw-r--r--
2022-04-21 14:24
groupBySeries.js
1.32
KB
-rw-r--r--
2022-04-21 14:24
index.js
19.05
KB
-rw-r--r--
2022-04-21 14:24
inject.js
2.61
KB
-rw-r--r--
2022-04-21 14:24
log.js
1.17
KB
-rw-r--r--
2022-04-21 14:24
map.js
2.03
KB
-rw-r--r--
2022-04-21 14:24
mapLimit.js
1.28
KB
-rw-r--r--
2022-04-21 14:24
mapSeries.js
1.18
KB
-rw-r--r--
2022-04-21 14:24
mapValues.js
2.19
KB
-rw-r--r--
2022-04-21 14:24
mapValuesLimit.js
1.99
KB
-rw-r--r--
2022-04-21 14:24
mapValuesSeries.js
1.3
KB
-rw-r--r--
2022-04-21 14:24
memoize.js
3.16
KB
-rw-r--r--
2022-04-21 14:24
nextTick.js
1.41
KB
-rw-r--r--
2022-04-21 14:24
package.json
2.36
KB
-rw-r--r--
2022-04-21 14:24
parallel.js
3.03
KB
-rw-r--r--
2022-04-21 14:24
parallelLimit.js
1.39
KB
-rw-r--r--
2022-04-21 14:24
priorityQueue.js
3.03
KB
-rw-r--r--
2022-04-21 14:24
queue.js
5.72
KB
-rw-r--r--
2022-04-21 14:24
race.js
2.11
KB
-rw-r--r--
2022-04-21 14:24
reduce.js
2.61
KB
-rw-r--r--
2022-04-21 14:24
reduceRight.js
1.5
KB
-rw-r--r--
2022-04-21 14:24
reflect.js
2.32
KB
-rw-r--r--
2022-04-21 14:24
reflectAll.js
2.73
KB
-rw-r--r--
2022-04-21 14:24
reject.js
1.41
KB
-rw-r--r--
2022-04-21 14:24
rejectLimit.js
1.24
KB
-rw-r--r--
2022-04-21 14:24
rejectSeries.js
1.13
KB
-rw-r--r--
2022-04-21 14:24
retry.js
5.31
KB
-rw-r--r--
2022-04-21 14:24
retryable.js
1.98
KB
-rw-r--r--
2022-04-21 14:24
select.js
1.49
KB
-rw-r--r--
2022-04-21 14:24
selectLimit.js
1.31
KB
-rw-r--r--
2022-04-21 14:24
selectSeries.js
1.21
KB
-rw-r--r--
2022-04-21 14:24
seq.js
2.92
KB
-rw-r--r--
2022-04-21 14:24
series.js
2.87
KB
-rw-r--r--
2022-04-21 14:24
setImmediate.js
1.36
KB
-rw-r--r--
2022-04-21 14:24
some.js
1.72
KB
-rw-r--r--
2022-04-21 14:24
someLimit.js
1.55
KB
-rw-r--r--
2022-04-21 14:24
someSeries.js
1.28
KB
-rw-r--r--
2022-04-21 14:24
sortBy.js
2.76
KB
-rw-r--r--
2022-04-21 14:24
timeout.js
2.71
KB
-rw-r--r--
2022-04-21 14:24
times.js
1.42
KB
-rw-r--r--
2022-04-21 14:24
timesLimit.js
1.36
KB
-rw-r--r--
2022-04-21 14:24
timesSeries.js
1021
B
-rw-r--r--
2022-04-21 14:24
transform.js
2.65
KB
-rw-r--r--
2022-04-21 14:24
tryEach.js
2.5
KB
-rw-r--r--
2022-04-21 14:24
unmemoize.js
681
B
-rw-r--r--
2022-04-21 14:24
until.js
1.41
KB
-rw-r--r--
2022-04-21 14:24
waterfall.js
3.26
KB
-rw-r--r--
2022-04-21 14:24
whilst.js
2.14
KB
-rw-r--r--
2022-04-21 14:24
wrapSync.js
3.42
KB
-rw-r--r--
2022-04-21 14:24
Save
Rename
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = retry; var _noop = require('lodash/noop'); var _noop2 = _interopRequireDefault(_noop); var _constant = require('lodash/constant'); var _constant2 = _interopRequireDefault(_constant); var _wrapAsync = require('./internal/wrapAsync'); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Attempts to get a successful response from `task` no more than `times` times * before returning an error. If the task is successful, the `callback` will be * passed the result of the successful task. If all attempts fail, the callback * will be passed the error and result (if any) of the final attempt. * * @name retry * @static * @memberOf module:ControlFlow * @method * @category Control Flow * @see [async.retryable]{@link module:ControlFlow.retryable} * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an * object with `times` and `interval` or a number. * * `times` - The number of attempts to make before giving up. The default * is `5`. * * `interval` - The time to wait between retries, in milliseconds. The * default is `0`. The interval may also be specified as a function of the * retry count (see example). * * `errorFilter` - An optional synchronous function that is invoked on * erroneous result. If it returns `true` the retry attempts will continue; * if the function returns `false` the retry flow is aborted with the current * attempt's error and result being returned to the final callback. * Invoked with (err). * * If `opts` is a number, the number specifies the number of times to retry, * with the default interval of `0`. * @param {AsyncFunction} task - An async function to retry. * Invoked with (callback). * @param {Function} [callback] - An optional callback which is called when the * task has succeeded, or after the final failed attempt. It receives the `err` * and `result` arguments of the last attempt at completing the `task`. Invoked * with (err, results). * * @example * * // The `retry` function can be used as a stand-alone control flow by passing * // a callback, as shown below: * * // try calling apiMethod 3 times * async.retry(3, apiMethod, function(err, result) { * // do something with the result * }); * * // try calling apiMethod 3 times, waiting 200 ms between each retry * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { * // do something with the result * }); * * // try calling apiMethod 10 times with exponential backoff * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) * async.retry({ * times: 10, * interval: function(retryCount) { * return 50 * Math.pow(2, retryCount); * } * }, apiMethod, function(err, result) { * // do something with the result * }); * * // try calling apiMethod the default 5 times no delay between each retry * async.retry(apiMethod, function(err, result) { * // do something with the result * }); * * // try calling apiMethod only when error condition satisfies, all other * // errors will abort the retry control flow and return to final callback * async.retry({ * errorFilter: function(err) { * return err.message === 'Temporary error'; // only retry on a specific error * } * }, apiMethod, function(err, result) { * // do something with the result * }); * * // to retry individual methods that are not as reliable within other * // control flow functions, use the `retryable` wrapper: * async.auto({ * users: api.getUsers.bind(api), * payments: async.retryable(3, api.getPayments.bind(api)) * }, function(err, results) { * // do something with the results * }); * */ function retry(opts, task, callback) { var DEFAULT_TIMES = 5; var DEFAULT_INTERVAL = 0; var options = { times: DEFAULT_TIMES, intervalFunc: (0, _constant2.default)(DEFAULT_INTERVAL) }; function parseTimes(acc, t) { if (typeof t === 'object') { acc.times = +t.times || DEFAULT_TIMES; acc.intervalFunc = typeof t.interval === 'function' ? t.interval : (0, _constant2.default)(+t.interval || DEFAULT_INTERVAL); acc.errorFilter = t.errorFilter; } else if (typeof t === 'number' || typeof t === 'string') { acc.times = +t || DEFAULT_TIMES; } else { throw new Error("Invalid arguments for async.retry"); } } if (arguments.length < 3 && typeof opts === 'function') { callback = task || _noop2.default; task = opts; } else { parseTimes(options, opts); callback = callback || _noop2.default; } if (typeof task !== 'function') { throw new Error("Invalid arguments for async.retry"); } var _task = (0, _wrapAsync2.default)(task); var attempt = 1; function retryAttempt() { _task(function (err) { if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { setTimeout(retryAttempt, options.intervalFunc(attempt)); } else { callback.apply(null, arguments); } }); } retryAttempt(); } module.exports = exports['default'];