apptask: only move app uses localstorage addon

This commit is contained in:
Girish Ramakrishnan
2024-06-06 15:22:33 +02:00
parent 3b26f6f5ea
commit f386c326e2
6 changed files with 21 additions and 12 deletions
+5 -8
View File
@@ -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;