Make start/stop just a installation code

the runState now just tracks if an app is stopped.
This commit is contained in:
Girish Ramakrishnan
2019-09-22 00:20:12 -07:00
parent ff1f448860
commit f3341f4b7f
4 changed files with 80 additions and 63 deletions

View File

@@ -239,6 +239,7 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal
const accessRestrictionJson = JSON.stringify(accessRestriction);
const memoryLimit = data.memoryLimit || 0;
const installationState = data.installationState || 'pending_install'; // FIXME
const runState = data.runState || 'running'; // FIXME
const sso = 'sso' in data ? data.sso : null;
const robotsTxt = 'robotsTxt' in data ? data.robotsTxt : null;
const debugModeJson = data.debugMode ? JSON.stringify(data.debugMode) : null;
@@ -250,10 +251,10 @@ function add(id, appStoreId, manifest, location, domain, portBindings, data, cal
var queries = [];
queries.push({
query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, accessRestrictionJson, memoryLimit, '
query: 'INSERT INTO apps (id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit, '
+ 'sso, debugModeJson, robotsTxt, mailboxName, label, tagsJson) '
+ ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
args: [ id, appStoreId, manifestJson, installationState, accessRestrictionJson, memoryLimit,
+ ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
args: [ id, appStoreId, manifestJson, installationState, runState, accessRestrictionJson, memoryLimit,
sso, debugModeJson, robotsTxt, mailboxName, label, tagsJson ]
});