Comparing version 16.3.0-beta.9 to 16.3.0-beta.10
@@ -56,2 +56,3 @@ "use strict"; | ||
exports.printDuration = printDuration; | ||
let error429Promise = null; | ||
function axiosMultipleTries(axiosCallCreator, retriesLeft = environment_1.NUMBER_OF_AXIOS_RETRIES) { | ||
@@ -77,11 +78,17 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
throw new AxiosException('failure', `Error when connecting to Nx Cloud. Code: ${code}. Error: ${message}.`, e); | ||
throw new AxiosException('failure', `Error when connecting to Nx Cloud. Code: ${code}. Error: ${message}`, e); | ||
} | ||
else { | ||
if (code == 429) { | ||
const retryAfter = 10000 + 30000 * Math.random(); | ||
output.note({ | ||
title: `Received Code ${code}. ${message} Retrying in ${retryAfter}ms.`, | ||
}); | ||
yield (0, waiter_1.wait)(retryAfter); | ||
// this logic helps us not print the same message over and over again | ||
if (!error429Promise) { | ||
const retryAfter = 10000 + | ||
(environment_1.NUMBER_OF_AXIOS_RETRIES + 1 - retriesLeft) * 60000 * Math.random(); | ||
output.note({ | ||
title: `Received Code ${code}. ${message} Retrying in ${retryAfter}ms.`, | ||
}); | ||
error429Promise = (0, waiter_1.wait)(retryAfter); | ||
} | ||
yield error429Promise; | ||
error429Promise = null; | ||
} | ||
@@ -88,0 +95,0 @@ else { |
{ | ||
"name": "nx-cloud", | ||
"version": "16.3.0-beta.9", | ||
"version": "16.3.0-beta.10", | ||
"description": "Distributed caching and task execution for Lerna and Nx", | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"open": "~8.4.0", | ||
"@nrwl/nx-cloud": "16.3.0-beta.9" | ||
"@nrwl/nx-cloud": "16.3.0-beta.10" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
391107
5211
+ Added@nrwl/nx-cloud@16.3.0-beta.10(transitive)
- Removed@nrwl/nx-cloud@16.3.0-beta.9(transitive)