apptask: only move app uses localstorage addon
This commit is contained in:
+5
-8
@@ -164,15 +164,14 @@ async function downloadImage(manifest) {
|
||||
async function getVolumeMounts(app) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
let mounts = [];
|
||||
|
||||
if (app.mounts.length === 0) return [];
|
||||
|
||||
const result = await volumes.list();
|
||||
|
||||
let volumesById = {};
|
||||
const volumesById = {};
|
||||
result.forEach(r => volumesById[r.id] = r);
|
||||
|
||||
const mounts = [];
|
||||
|
||||
for (const mount of app.mounts) {
|
||||
const volume = volumesById[mount.volumeId];
|
||||
|
||||
@@ -190,8 +189,7 @@ async function getVolumeMounts(app) {
|
||||
async function getAddonMounts(app) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
let mounts = [];
|
||||
|
||||
const mounts = [];
|
||||
const addons = app.manifest.addons;
|
||||
if (!addons) return mounts;
|
||||
|
||||
@@ -265,8 +263,7 @@ async function createSubcontainer(app, name, cmd, options) {
|
||||
assert(!cmd || Array.isArray(cmd));
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
|
||||
let isAppContainer = !cmd; // non app-containers are like scheduler
|
||||
|
||||
const isAppContainer = !cmd; // non app-containers are like scheduler
|
||||
const manifest = app.manifest;
|
||||
const exposedPorts = {}, dockerPortBindings = { };
|
||||
const domain = app.fqdn;
|
||||
|
||||
Reference in New Issue
Block a user