diff --git a/src/apptask.js b/src/apptask.js index c8ae42890..37155a3f1 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -71,7 +71,7 @@ async function allocateContainerIp(app) { await promiseRetry({ times: 10, interval: 0, debug }, async function () { const iprange = iputils.intFromIp(constants.APPS_IPv4_END) - iputils.intFromIp(constants.APPS_IPv4_START); - let rnd = Math.floor(Math.random() * iprange); + const rnd = Math.floor(Math.random() * iprange); const containerIp = iputils.ipFromInt(iputils.intFromIp(constants.APPS_IPv4_START) + rnd); await updateApp(app, { containerIp }); }); @@ -133,7 +133,7 @@ async function deleteAppDir(app, options) { // remove only files. directories inside app dir are currently volumes managed by the addons // we cannot delete those dirs anyway because of perms entries.forEach(function (entry) { - let stat = safe.fs.statSync(path.join(resolvedAppDataDir, entry)); + const stat = safe.fs.statSync(path.join(resolvedAppDataDir, entry)); if (stat && !stat.isDirectory()) safe.fs.unlinkSync(path.join(resolvedAppDataDir, entry)); }); } @@ -247,7 +247,7 @@ async function updateChecklist(app, newChecks) { // add new checklist items depending on sso state const checklist = app.checklist || {}; - for (let k in newChecks) { + for (const k in newChecks) { if (app.checklist[k]) continue; const item = {