apptask: backupId/format is not part of install anymore
This commit is contained in:
14
src/apps.js
14
src/apps.js
@@ -718,8 +718,6 @@ function install(data, user, auditSource, callback) {
|
||||
robotsTxt = data.robotsTxt || null,
|
||||
enableBackup = 'enableBackup' in data ? data.enableBackup : true,
|
||||
enableAutomaticUpdate = 'enableAutomaticUpdate' in data ? data.enableAutomaticUpdate : true,
|
||||
backupId = data.backupId || null,
|
||||
backupFormat = data.backupFormat || 'tgz',
|
||||
alternateDomains = data.alternateDomains || [],
|
||||
env = data.env || {},
|
||||
mailboxName = data.mailboxName || '',
|
||||
@@ -753,9 +751,6 @@ function install(data, user, auditSource, callback) {
|
||||
error = validateRobotsTxt(robotsTxt);
|
||||
if (error) return callback(error);
|
||||
|
||||
error = validateBackupFormat(backupFormat);
|
||||
if (error) return callback(error);
|
||||
|
||||
error = validateLabel(label);
|
||||
if (error) return callback(error);
|
||||
|
||||
@@ -811,7 +806,7 @@ function install(data, user, auditSource, callback) {
|
||||
label: label,
|
||||
tags: tags,
|
||||
runState: exports.RSTATE_RUNNING,
|
||||
installationState: backupId ? exports.ISTATE_PENDING_RESTORE : exports.ISTATE_PENDING_INSTALL
|
||||
installationState: exports.ISTATE_PENDING_INSTALL
|
||||
};
|
||||
|
||||
appdb.add(appId, appStoreId, manifest, location, domain, translatePortBindings(portBindings, manifest), data, function (error) {
|
||||
@@ -828,14 +823,13 @@ function install(data, user, auditSource, callback) {
|
||||
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, 'Error setting cert: ' + error.message));
|
||||
}
|
||||
|
||||
const restoreConfig = backupId ? { backupId: backupId, backupFormat: backupFormat } : null;
|
||||
const task = {
|
||||
args: { restoreConfig, overwriteDns },
|
||||
args: { restoreConfig: null, overwriteDns },
|
||||
values: { },
|
||||
requiredState: data.installationState
|
||||
requiredState: exports.ISTATE_PENDING_INSTALL
|
||||
};
|
||||
|
||||
addTask(appId, data.installationState, task, function (error, result) {
|
||||
addTask(appId, exports.ISTATE_PENDING_INSTALL, task, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
const newApp = _.extend({}, data, { appStoreId, manifest, location, domain, portBindings });
|
||||
|
||||
Reference in New Issue
Block a user