Remove apps.getAppConfig
This commit is contained in:
22
src/apps.js
22
src/apps.js
@@ -54,7 +54,6 @@ exports = module.exports = {
|
||||
restoreInstalledApps: restoreInstalledApps,
|
||||
configureInstalledApps: configureInstalledApps,
|
||||
|
||||
getAppConfig: getAppConfig,
|
||||
getDataDir: getDataDir,
|
||||
getIconPath: getIconPath,
|
||||
|
||||
@@ -406,25 +405,6 @@ function getDuplicateErrorDetails(errorMessage, location, domainObject, portBind
|
||||
return new AppsError(AppsError.ALREADY_EXISTS, `${match[2]} '${match[1]}' is in use`);
|
||||
}
|
||||
|
||||
// app configs that is useful for 'archival' into the app backup config.json
|
||||
function getAppConfig(app) {
|
||||
return {
|
||||
manifest: app.manifest,
|
||||
location: app.location,
|
||||
domain: app.domain,
|
||||
fqdn: app.fqdn,
|
||||
accessRestriction: app.accessRestriction,
|
||||
portBindings: app.portBindings,
|
||||
memoryLimit: app.memoryLimit,
|
||||
|
||||
robotsTxt: app.robotsTxt,
|
||||
sso: app.sso,
|
||||
alternateDomains: app.alternateDomains || [],
|
||||
env: app.env,
|
||||
dataDir: app.dataDir
|
||||
};
|
||||
}
|
||||
|
||||
function getDataDir(app, dataDir) {
|
||||
return dataDir || path.join(paths.APPS_DATA_DIR, app.id, 'data');
|
||||
}
|
||||
@@ -1729,7 +1709,7 @@ function configureInstalledApps(callback) {
|
||||
appdb.update(app.id, { taskId: null }, function (error) { // clear any stale taskId
|
||||
if (error) debug(`Error marking ${app.fqdn} for reconfigure: ${JSON.stringify(error)}`);
|
||||
|
||||
scheduleTask(app.id, { oldConfig: getAppConfig(app) }, { installationState: exports.ISTATE_PENDING_CONFIGURE }, () => iteratorDone()); // always succeed
|
||||
scheduleTask(app.id, { oldConfig: app }, { installationState: exports.ISTATE_PENDING_CONFIGURE }, () => iteratorDone()); // always succeed
|
||||
});
|
||||
}, callback);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user