clear taskId in the parent process
This commit is contained in:
@@ -596,9 +596,12 @@ function scheduleTask(appId, args, values, callback) {
|
||||
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error));
|
||||
|
||||
appTaskManager.scheduleTask(appId, taskId, function (error) {
|
||||
debug(`scheduleTask: task ${taskId} of $${appId} completed`);
|
||||
if (error && (error.crashed || error.stopped)) {
|
||||
debug(`Apptask crashed/stopped: ${error.message}`);
|
||||
appdb.update(appId, { installationState: appdb.ISTATE_ERROR, errorMessage: error.message, taskId: null }, NOOP_CALLBACK);
|
||||
} else {
|
||||
appdb.update(appId, { taskId: null }, NOOP_CALLBACK);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user