clear taskId in the parent process
This commit is contained in:
@@ -589,11 +589,11 @@ function install(app, restoreConfig, progressCallback, callback) {
|
||||
configureReverseProxy.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, health: null, taskId: null })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, health: null })
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error installing app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, taskId: null }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -611,11 +611,11 @@ function backup(app, progressCallback, callback) {
|
||||
}),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', taskId: null })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '' })
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error backing up app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: error.message, taskId: null }, callback.bind(null, error)); // return to installed state intentionally
|
||||
return updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: error.message }, callback.bind(null, error)); // return to installed state intentionally
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -692,11 +692,11 @@ function configure(app, oldConfig, progressCallback, callback) {
|
||||
configureReverseProxy.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null, taskId: null })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null })
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error reconfiguring : %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, taskId: null }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
@@ -799,11 +799,11 @@ function update(app, updateConfig, progressCallback, callback) {
|
||||
runApp.bind(null, app, progressCallback),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null, taskId: null, updateTime: new Date() })
|
||||
updateApp.bind(null, app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null, updateTime: new Date() })
|
||||
], function seriesDone(error) {
|
||||
if (error && error.backupError) {
|
||||
debugApp(app, 'update aborted because backup failed', error);
|
||||
updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null, taskId: null }, callback.bind(null, error));
|
||||
updateApp(app, { installationState: appdb.ISTATE_INSTALLED, errorMessage: '', health: null }, callback.bind(null, error));
|
||||
} else if (error) {
|
||||
debugApp(app, 'Error updating app: %s', error);
|
||||
updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, updateTime: new Date() }, callback.bind(null, error));
|
||||
@@ -860,7 +860,7 @@ function uninstall(app, progressCallback, callback) {
|
||||
], function seriesDone(error) {
|
||||
if (error) {
|
||||
debugApp(app, 'error uninstalling app: %s', error);
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, taskId: null }, callback.bind(null, error));
|
||||
return updateApp(app, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message }, callback.bind(null, error));
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user