Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/share/.cache/yarn/v6/npm-atomically-1.7.0-integrity/node_modules/atomically/dist/utils/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
/* IMPORT */
Object.defineProperty(exports, "__esModule", { value: true });
exports.retryifySync = exports.retryifyAsync = void 0;
const retryify_queue_1 = require("./retryify_queue");
/* RETRYIFY */
const retryifyAsync = (fn, isRetriableError) => {
return function (timestamp) {
return function attempt() {
return retryify_queue_1.default.schedule().then(cleanup => {
return fn.apply(undefined, arguments).then(result => {
cleanup();
return result;
}, error => {
cleanup();
if (Date.now() >= timestamp)
throw error;
if (isRetriableError(error)) {
const delay = Math.round(100 + (400 * Math.random())), delayPromise = new Promise(resolve => setTimeout(resolve, delay));
return delayPromise.then(() => attempt.apply(undefined, arguments));
}
throw error;
});
});
};
};
};
exports.retryifyAsync = retryifyAsync;
const retryifySync = (fn, isRetriableError) => {
return function (timestamp) {
return function attempt() {
try {
return fn.apply(undefined, arguments);
}
catch (error) {
if (Date.now() > timestamp)
throw error;
if (isRetriableError(error))
return attempt.apply(undefined, arguments);
throw error;
}
};
};
};
exports.retryifySync = retryifySync;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0059 ]-- |