pass debug to promise-retry

This commit is contained in:
Girish Ramakrishnan
2021-12-07 11:18:26 -08:00
parent ae0e572593
commit 013f5d359d
6 changed files with 14 additions and 19 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ async function updateApp(app, values) {
async function allocateContainerIp(app) {
assert.strictEqual(typeof app, 'object');
await promiseRetry({ times: 10, interval: 0}, async function () {
await promiseRetry({ times: 10, interval: 0, debug }, async function () {
const iprange = iputils.intFromIp('172.18.20.255') - iputils.intFromIp('172.18.16.1');
let rnd = Math.floor(Math.random() * iprange);
const containerIp = iputils.ipFromInt(iputils.intFromIp('172.18.16.1') + rnd);
@@ -221,7 +221,7 @@ async function downloadIcon(app) {
const iconUrl = settings.apiServerOrigin() + '/api/v1/apps/' + app.appStoreId + '/versions/' + app.manifest.version + '/icon';
await promiseRetry({ times: 10, interval: 5000 }, async function () {
await promiseRetry({ times: 10, interval: 5000, debug }, async function () {
const [networkError, response] = await safe(superagent.get(iconUrl)
.buffer(true)
.timeout(30 * 1000)