promise-retry: rename api to log
This commit is contained in:
+3
-3
@@ -63,7 +63,7 @@ async function allocateContainerIp(app) {
|
||||
|
||||
if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) return;
|
||||
|
||||
await promiseRetry({ times: 10, interval: 0, debug: log }, async function () {
|
||||
await promiseRetry({ times: 10, interval: 0, log }, async function () {
|
||||
const iprange = iputils.intFromIp(constants.APPS_IPv4_END) - iputils.intFromIp(constants.APPS_IPv4_START);
|
||||
const rnd = Math.floor(Math.random() * iprange);
|
||||
const containerIp = iputils.ipFromInt(iputils.intFromIp(constants.APPS_IPv4_START) + rnd);
|
||||
@@ -865,9 +865,9 @@ async function run(appId, args, progressCallback) {
|
||||
|
||||
if (app.installationState === apps.ISTATE_PENDING_UPDATE && error.backupError) {
|
||||
log('run: update aborted because backup failed');
|
||||
await safe(updateApp(app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null }, { debug: log }));
|
||||
await safe(updateApp(app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null }, { log }));
|
||||
} else {
|
||||
await safe(updateApp(app, { installationState: apps.ISTATE_ERROR, error: makeTaskError(error, app) }), { debug: log });
|
||||
await safe(updateApp(app, { installationState: apps.ISTATE_ERROR, error: makeTaskError(error, app) }), { log });
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user